A token following an `if` clause can be recorded twice, and the output will contain an empty terminal token. For example, for ``` R { if (x) 2 f(x) } ``` the result looks like: ``` token id parent top_level token.desc terminal text 1 123 1 35 0 '{' TRUE { 2 272 4 18 0 IF TRUE if 3 40 6 18 0 '(' TRUE ( 4 263 7 9 0 SYMBOL TRUE x 5 41 8 18 0 ')' TRUE ) 6 78 9 18 0 expr FALSE 7 261 12 13 0 NUM_CONST TRUE 1 8 78 13 18 0 expr FALSE 9 263 16 35 0 SYMBOL TRUE f 10 78 18 35 0 expr FALSE 11 297 21 23 0 SYMBOL_FUNCTION_CALL TRUE 12 40 22 29 0 '(' TRUE ( 13 78 23 29 0 expr FALSE 14 263 24 26 0 SYMBOL TRUE x 15 41 25 29 0 ')' TRUE ) 16 78 26 29 0 expr FALSE 17 78 29 35 0 expr FALSE 18 125 33 35 0 '}' TRUE } 19 78 35 0 0 expr FALSE ``` Line 9 is redundant and `f` should appear on line 11.
Activity
halpo commentedon Jul 3, 2012
Confirmed. Thank you.
merged pull request #3.