#
46975107 |
| 18-Dec-2014 |
Nikita Popov |
Support token position attributes in lexer Also change endFilePos semantics to refer to the last character that is *included* in the token, rather than one past the last character. T
Support token position attributes in lexer Also change endFilePos semantics to refer to the last character that is *included* in the token, rather than one past the last character. This ensures that all end* attributes have the same semantics.
show more ...
|
#
d774dbc1 |
| 27-Nov-2014 |
Máximo Cuadros Ortiz |
Add optional startFilePos and endFilePos attributes The lexer can now optionally add startFilePos and endFilePos attributes, which are offsets in to the lexed code string. The e
Add optional startFilePos and endFilePos attributes The lexer can now optionally add startFilePos and endFilePos attributes, which are offsets in to the lexed code string. The end offset currently points one past the last character of the token - this is pending further discussion. The attributes are not added by default and have to be enabled using the new 'usedAttributes' lexer option: $lexer = new Lexer([ 'usedAttributes' => [ 'comments', 'startLine', 'endLine', 'startFilePos', 'endFilePos' ] ]);
show more ...
|