comments improve code
This commit is contained in:
parent
c352384822
commit
b63198d581
|
@ -221,16 +221,17 @@ class OscCommentMacroListener(CommentMacroListener):
|
||||||
ctx.time = None
|
ctx.time = None
|
||||||
|
|
||||||
def exitMacro(self, ctx: CommentMacroParser.MacroContext):
|
def exitMacro(self, ctx: CommentMacroParser.MacroContext):
|
||||||
|
# print the lisp tree of this macro
|
||||||
lisp_tree_str = ctx.toStringTree(recog=self.parser)
|
lisp_tree_str = ctx.toStringTree(recog=self.parser)
|
||||||
print(beautify_lisp_string(lisp_tree_str))
|
print(beautify_lisp_string(lisp_tree_str))
|
||||||
|
|
||||||
|
# execute macro from name
|
||||||
name = ctx.children[0].getText()
|
name = ctx.children[0].getText()
|
||||||
try:
|
try:
|
||||||
command[name](self, ctx)
|
command[name](self, ctx)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
print(name + " macro is not compatable with OSC.")
|
print(name + " macro is not compatable with OSC.")
|
||||||
return -1
|
return -1
|
||||||
|
|
||||||
print("Exiting Macro")
|
print("Exiting Macro")
|
||||||
|
|
||||||
def enterMaster(self, ctx: CommentMacroParser.MasterContext):
|
def enterMaster(self, ctx: CommentMacroParser.MasterContext):
|
||||||
|
|
Loading…
Reference in New Issue