-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
As far as I could see this has not been reported yet.
module Weird
extend lang::std::Layout;
extend lang::std::Id;
import IO;
syntax C = c: Id type;
str a((C)`<Id tpe>`) = "<tpe>";
// Syntax error, unescaped keyword
// str b((C)`<Id type>`) = "<\type>";
// Syntax error, unescaped keyword
//str c((C)`<Id \type>`) = "<type>";
str d((C)`<Id \type>`) = "<\type>";
void main() {
x = parse(#C, "foo");
// This works as expected
println(a(x));
// this yields a runtime error
println(d(x));
}will produce:
rascal>import Weird;
ok
rascal>main();
foo
|project://Minos/src/Weird.rsc|(306,5,<18,27>,<18,32>): Undeclared variable: type
Advice: |http://tutor.rascal-mpl.org/Errors/Static/UndeclaredVariable/UndeclaredVariable.html|
okShouldn't you be able to escape type like I do in d?
Reactions are currently unavailable