tagua-vm / parser

Safe, fast and memory efficient PHP parser (lexical and syntactic analysers, and the Abstract Syntax Tree)
http://tagua.io/
119 stars 15 forks source link

Token: Add operators and punctuators #22

Closed Hywan closed 8 years ago

Hywan commented 8 years ago

Address https://github.com/tagua-vm/parser/issues/5, #8.

Specification

https://github.com/php/php-langspec/blob/master/spec/19-grammar.md#operators-and-punctuators

Progression

Hywan commented 8 years ago

I have removed PLUS and DOLLARS, which are redundant with ADD and VARIABLE. I have introduced the following private tokens: COLON and QUESTION_MARK (they are respectively used by FUNCTION_OUTPUT and TERNARY_ELSE, and by NULLABLE and TERNARY_THEN). I have added FUNCTION_OUTPUT (didn't find a better name…) and NULLABLE.

Hywan commented 8 years ago

I have rebased my work too. Ready for another review @jubianchi :smiley:!

Hywan commented 8 years ago

ping @jubianchi?

jubianchi commented 8 years ago

@Hywan good for me! Glab you chose to extends the token! macro, I think it will let us do some cool things!