In TS using Stratego keywords as variable names will generate invalid Stratego code.

NavigateIn(prev, nav, in, EntityType(rel-ty)) : rel-ty
where prev	: prev-ty
	and in		: in-ty
	and prev-ty == in-ty else error "The inRole is of the wrong type." on in

generates

create-type-task(|ctx) :
    NavigateIn(prev, nav, in, EntityType(rel-ty)) -> <task-create-id(|ctx, [prev-ty, in-ty, eq3565])> rel-ty
    where prev-ty := <type-task(|ctx)> prev;
          in-ty := <type-task(|ctx)> in;
          eq3565 := <type-match(|ctx, in-ty)> prev-ty;
          <task-create-error-on-failure(|ctx, eq3565, "The inRole is of the wrong type.")> in

Suggested fixes: prefix TS variable names during generation or give an error in TS.

Submitted by Daco Harkes on 13 March 2014 at 08:59

Log in to post comments