The syntax for a location (loc
) is defined (according to tutor.rascal.org) as: | Uri | ( O, L, <BL,BC>, <EL,EC> )
where
Uri
is an arbitrary Uniform Resource Identifier (URI).O
andL
are integer expressions, whereO
gives the offset to the beginning of the file and 'L' gives the length of the file.BL
andBC
are integers denoting the beginning line and column.EC
andEL
are integers denoting the ending line and column.
I am currently trying to copy an instance of loc
and modify the values (BL
, BC
, EC
, EL
). I'm having quite some trouble doing it. I've tried.
- Pattern matching a
loc
parameter using the syntax definition. - Attempting to access fields as if they were qualified names.
Evidently none of these worked out. I am unable to find too much more about doing this in the Rascal documentation. Can I get any pointers as to how to access these values?
Thanks!