Lists that are created in Stratego cannot have origins. (Lists that are created by the parser do have origins.)

Workaround: create custom lookups for lists (assuming one does not create empty lists).

origin-offset: list -> (start-offset, end-offset)
  <is-list> list;
 	(start-offset, _) := <Hd; origin-offset> list;
 	(_, end-offset)   := <last; origin-offset> list

Also used in

Submitted by Daco Harkes on 26 November 2014 at 15:22

Log in to post comments