You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some grammars there are separators that are important to the grammar but uninteresting in the output from the parse tree. Whitespace is the most obvious example.
It'd be cool if there was a way, from within a rule action, to indicate that the output of the rule should not be included in the parse tree.
Since null is already taken to indicate a match/predicate failure, and false is conceivable as a desired return value, perhaps a return value of undefined could be used to cull the rule's output.
The text was updated successfully, but these errors were encountered:
I want to concentrate on usability issues in version 0.7. I don't like the undefined idea much, but I agree that this is a problem that should be addressed in some way.
Deciding whether something belongs into the parse tree based on action return value seems to me as a wrong way to ignore some parts of the input. I won't implement this.
In some grammars there are separators that are important to the grammar but uninteresting in the output from the parse tree. Whitespace is the most obvious example.
It'd be cool if there was a way, from within a rule action, to indicate that the output of the rule should not be included in the parse tree.
Since
null
is already taken to indicate a match/predicate failure, andfalse
is conceivable as a desired return value, perhaps a return value ofundefined
could be used to cull the rule's output.The text was updated successfully, but these errors were encountered: