Get line number inside the grammar file

Mar 1, 2011 at 10:27 PM

Hi all,

I need your help please, I need to get the line number that is processed now in the grammar file ? I want to use this inside an action .


Mar 2, 2011 at 4:01 PM

IToken has the Line property.

This should work...


foo=ID  { Console.WriteLine($foo.Line); }

Mar 2, 2011 at 5:07 PM

thanks anbrad :)