-
Notifications
You must be signed in to change notification settings - Fork 248
fix(parser): changes parser to throw an error when it encounters an unexpected token #905
Conversation
Thanks for your contribution! In order for us to be able to accept it, we ask you to sign our CLA (contributor's license agreement). CLA is important for us to be able to avoid legal troubles down the road. For individuals (a simple click-through form): http://code.google.com/legal/individual-cla-v1.0.html |
@@ -40,6 +40,9 @@ class DynamicParserImpl { | |||
if (isChain && expr is Filter) { | |||
error('Cannot have a filter in a chain'); | |||
} | |||
if(!isChain && index < tokens.length){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing ws before & after parenthesis
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
LGTM with a few comments. Thanks for the fix. |
Achievement unlocked: CLA signature found! |
Just pushed the style changes. Please, let me know if anything else is required. |
could you please squash your commits and force push and then you're fine. |
…nexpected token Change the handling of unexpected tokens. Make the parser throw the "is an unexpected token" exception, so ExpressionVisitor won't throw confusing "Can not watch expression containing ';'". Closes dart-archive#830
@vicb I squashed the commits. |
@mhevery I don't want to merge this while you are preparing the release. Can you handle this once you're done ? Thanks. |
Change the handling of unexpected tokens. Make the parser throw the "is an unexpected token" exception, so ExpressionVisitor won't throw confusing "Can not watch expression containing ';'".
Closes #830