Hello,
I have built a transformer that I am trying to use. The transformer behaves as expected, but I need row and column numbers for each node in the tree. Propogate_positions works, but the information is not available to the transformer because only the children of the node is provided, not the line or column information. Both v_args(meta=True) or v_args(tree=True) appear to be ignored- I can't seem to get either to work. I've tried applying the function decorators to the class, and to each method individually. I've also tried both Transformer (supplied with transformer=MyTransformer()) and Transformer_inline (supplied with result = MyTransformer().transform(l.parse(document)))- neither one seems to supply the tree as an argument. I'm using lalr as my parser.
Hello, I have built a transformer that I am trying to use. The transformer behaves as expected, but I need row and column numbers for each node in the tree. Propogate_positions works, but the information is not available to the transformer because only the children of the node is provided, not the line or column information. Both v_args(meta=True) or v_args(tree=True) appear to be ignored- I can't seem to get either to work. I've tried applying the function decorators to the class, and to each method individually. I've also tried both Transformer (supplied with transformer=MyTransformer()) and Transformer_inline (supplied with result = MyTransformer().transform(l.parse(document)))- neither one seems to supply the tree as an argument. I'm using lalr as my parser.