diff --git a/src/org/rascalmpl/library/lang/rascal/syntax/tests/ConcreteSyntax.rsc b/src/org/rascalmpl/library/lang/rascal/syntax/tests/ConcreteSyntax.rsc index a9ef5d24d51..f43c9fa1238 100644 --- a/src/org/rascalmpl/library/lang/rascal/syntax/tests/ConcreteSyntax.rsc +++ b/src/org/rascalmpl/library/lang/rascal/syntax/tests/ConcreteSyntax.rsc @@ -1,5 +1,7 @@ module lang::rascal::\syntax::tests::ConcreteSyntax +import Node; + syntax A = a:"a" | b:"b" @@ -78,3 +80,9 @@ public test bool matchstar4() = (S) `star .` := star_two; public test bool matchstar5() = (S) `star .` := star_two; public test bool splicestar1() = (S*) x := star_two.\list && (S) `star s s s s.` := (S) `star .` ; + +test bool noLocAnnos() { + a = (A) `a b`; + kwParams = {kw | /node t := a, kw <- getKeywordParameters(t)}; + return "loc" notin kwParams; +} diff --git a/src/org/rascalmpl/semantics/dynamic/Tree.java b/src/org/rascalmpl/semantics/dynamic/Tree.java index d1bf20785f9..522d28a8d0c 100644 --- a/src/org/rascalmpl/semantics/dynamic/Tree.java +++ b/src/org/rascalmpl/semantics/dynamic/Tree.java @@ -273,9 +273,9 @@ public Result interpret(IEvaluator> eval) { ISourceLocation location = getLocation(); if (location != null) { - java.util.Map annos = new HashMap(); - annos.put("loc", location); - return makeResult(type, VF.appl(annos, production, flatten(w.done())), eval); + java.util.Map kwParams = new HashMap<>(); + kwParams.put(RascalValueFactory.Location, location); + return makeResult(type, VF.appl(kwParams, production, flatten(w.done())), eval); } else { return makeResult(type, VF.appl(production, flatten(w.done())), eval);