remove parser internals from macro implementations
This commit is contained in:
parent
54340773bc
commit
1c4c4b18a2
|
@ -112,5 +112,4 @@ class OscCommentMacroListener(CommentMacroListener):
|
||||||
ctx.parentCtx.device = ctx
|
ctx.parentCtx.device = ctx
|
||||||
|
|
||||||
def exitNodeType(self, ctx: CommentMacroParser.NodeTypeContext):
|
def exitNodeType(self, ctx: CommentMacroParser.NodeTypeContext):
|
||||||
if isinstance(ctx.parentCtx, CommentMacroParser.DeviceContext):
|
ctx.parentCtx.type = ctx.getText()
|
||||||
ctx.parentCtx.type = ctx
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ class HogDevice():
|
||||||
if device is None:
|
if device is None:
|
||||||
osc = list(self.servers.values())[0]
|
osc = list(self.servers.values())[0]
|
||||||
else:
|
else:
|
||||||
if (device.type.getText() != 'h'):
|
if (device.type != 'h'):
|
||||||
logger.error("ERROR: Only Hog type devices are supported.")
|
logger.error("ERROR: Only Hog type devices are supported.")
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue