Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
module lang::rascal::\syntax::tests::ConcreteSyntax

import Node;

syntax A
= a:"a"
| b:"b"
Expand Down Expand Up @@ -78,3 +80,9 @@ public test bool matchstar4() = (S) `star <S* _>.` := star_two;
public test bool matchstar5() = (S) `star <S _> <S* _>.` := star_two;

public test bool splicestar1() = (S*) x := star_two.\list && (S) `star s s s s.` := (S) `star <S x> <S* x>.` ;

test bool noLocAnnos() {
a = (A) `a b`;
kwParams = {kw | /node t := a, kw <- getKeywordParameters(t)};
return "loc" notin kwParams;
}
6 changes: 3 additions & 3 deletions src/org/rascalmpl/semantics/dynamic/Tree.java
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,9 @@ public Result<IValue> interpret(IEvaluator<Result<IValue>> eval) {
ISourceLocation location = getLocation();

if (location != null) {
java.util.Map<String,IValue> annos = new HashMap<String,IValue>();
annos.put("loc", location);
return makeResult(type, VF.appl(annos, production, flatten(w.done())), eval);
java.util.Map<String, IValue> 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);
Expand Down
Loading