Replies: 1 comment
-
This is more or less how it works as I see it:
If you swap the ruleset over to "all" it will match all of these expressions:
The resulting parse tree is:
If you add a $ before the brackets for hash (
And you can further customize it by using ( |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This might be related to #271 and it's a real world case in handlebars
consider the rules
The rule
exp
works great to match expression like{{echo a b c d=1}}
until there is an invalidname
within it, like{{echo a b c_d}}
. Note that in ourname
rule, underscore is only allowed as a leading character. However, in this case it still matchesexp
, withc
and_d
parsed as twoparam
s. What I expect is a failure of matching.So I changed
exp
to below to ensure whitespaces between params.However, it fails to match basic case like
{{echo a b}}
, and sayswhich is confusing. So before #271 landing (seems never to happen) , is there any workaround for my case?
Beta Was this translation helpful? Give feedback.
All reactions