google / bamboo-soy

An intellij plugin supporting Closure Template language (Soy)
Apache License 2.0
48 stars 27 forks source link

Improved identifier parsing and error annotations #66

Closed denesalmasi closed 7 years ago

denesalmasi commented 7 years ago

More flexible identifier handling in the parser.

I have moved out the bulk of identifier identification from the lexer, into the parser. The new parsing allows elegant handling of property referencing using the dot operator. Before this change, $foo[1].bar did not work because the lexer tokenized .bar as a local identifier.

An improved IdentifierAnnotator watches for many kinds of mistakes that can be made with identifiers and provides specific feedback to the user. Later this can be extend by adding quick fixes for some of these.