Skip to content

Instantly share code, notes, and snippets.

View sangwoo-joh's full-sized avatar
🐫

Sangwoo Joh sangwoo-joh

🐫
View GitHub Profile
@sangwoo-joh
sangwoo-joh / visitor.py
Created September 16, 2022 06:59
Standard Visitor class for tree-sitter, support with `visit` and `leave` callbacks
# Very inspired by https://github.com/tree-sitter/py-tree-sitter/pull/90
class Visitor:
def visit(self, _node):
return True
def leave(self, _node):
pass
def on_visit(self, node):
@sangwoo-joh
sangwoo-joh / libcst_transformer.py
Last active June 14, 2022 03:56
A rough example code for renaming variables using libcst.
import libcst
import difflib
from termcolor import colored
class RenameTransformer(libcst.CSTTransformer):
def __init__(self, rename_pairs):
self.rename_pairs = rename_pairs
self.restore_keywords = []
@sangwoo-joh
sangwoo-joh / github-emoji-full.md
Last active February 13, 2020 02:10 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: