Since token sub-rules (e.g., fragments) are not represented by unique nodes in the tree, even though listeners are called when the generation of a sub-rule starts or ends, the listeners only see the top-level token node and the name of the top-level lexer rule.
This commit changes this by faking the top-level token node to have the name of the sub-rule rule while generating the sub-rule.
coverage: 85.62% (+0.2%) from 85.394%
when pulling 6b49680e8e0e97d3fce6dc1fd25e9335e8841204 on akosthekiss:fix-fragment-name
into 76e8eb54a3918cbb201ed309b6d8fd8ab2a47daa on renatahodovan:master.
Since token sub-rules (e.g., fragments) are not represented by unique nodes in the tree, even though listeners are called when the generation of a sub-rule starts or ends, the listeners only see the top-level token node and the name of the top-level lexer rule.
This commit changes this by faking the top-level token node to have the name of the sub-rule rule while generating the sub-rule.