FsLexYacc icon indicating copy to clipboard operation
FsLexYacc copied to clipboard

Is there an equivalent to `$startpos` and `$endpos`?

Open njlr opened this issue 2 months ago • 0 comments

In this code for ocamlyacc, there are expressions $startpos and $endpos:

| x = TIDENT
     { Tvar (($startpos, $endpos), x) }

https://github.com/ahrefs/atd/blob/7f786931e05b238b2cc4a9c63c2521d3f68d7052/atd/src/parser.mly#L135-L136

I think that these take the location of the TIDENT token.

Is there an equivalent to this in FsYacc?

njlr avatar Oct 22 '25 21:10 njlr