Hello,

I am using antlr/C# to create a scripting language with a step-through
debugger that highlights in yellow the line of code that is about to
execute. I was able to identify the line number based on the 'Line' property
of my Antlr-generated AST node (Antlr.Runtime.Tree.ITree,
Antlr.Runtime.Tree.CommonTree). Now I would like to identify the character
range corresponding to one of these AST nodes, so I can actually highlight
the exact part of the line that is about to execute, which is useful in
certain situations (e.g. a function call expression being used as a
parameter within another function call expression).

The trouble is, I am able to find the start position via the
'CharPositionInLine' property, but I have had no luck finding the end
position (or the length of the token text, which would be just as good).
What is the ideal/intended way of accessing this information from the object
types identified above?
-- 
View this message in context: 
http://antlr.1301665.n2.nabble.com/Identifying-character-position-start-and-end-of-tokens-tp5313296p5313296.html
Sent from the ANTLR mailing list archive at Nabble.com.

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to