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
6 changes: 3 additions & 3 deletions src/org/rascalmpl/library/lang/box/util/Tree2Box.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ by the user is necessary.
default Box toBox(t:appl(Production p, list[Tree] args), FO opts = fo()) {
// the big workhorse switch identifies all kinds of special cases for shapes of
// grammar rules, and accidental instances (emptiness, only whitespace, etc.)
Symbol nl = #[\n].symbol;
Symbol _nl = #[\n].symbol;
Symbol notNl = #![\n].symbol;

switch (<delabel(p), args>) {
Expand Down Expand Up @@ -189,7 +189,7 @@ default Box toBox(t:appl(Production p, list[Tree] args), FO opts = fo()) {
// We remove all layout node positions to make the number of children predictable
// Comments can be recovered by `layoutDiff`. By not recursing into layout
// positions `toBox` becomes more than twice as fast.
case <prod(layouts(_), _, _), list[Tree] content>:
case <prod(layouts(_), _, _), list[Tree] _content>:
return NULL();

// if we are given a comment node, then we can format it here for use by layoutDiff
Expand Down Expand Up @@ -241,7 +241,7 @@ default Box toBox(t:appl(Production p, list[Tree] args), FO opts = fo()) {
// if the sort name is statement-like and the structure block-like, we go for
// vertical with indentation
// program: "begin" Declarations decls {Statement ";"}* body "end" ;
case <prod(sort(/[stm]/), [*Symbol pre, op:lit(_), *Symbol bl, cl:lit(_)], _), list[Tree] elements>:
case <prod(sort(/[stm]/), [*Symbol pre, _op:lit(_), *Symbol _bl, _cl:lit(_)], _), list[Tree] elements>:
return V([
H([*[toBox(p, opts=opts) | Tree p <- elements[0..size(pre)]], toBox(elements[size(pre)], opts=opts)]),
I([V([toBox(e, opts=opts) | Tree e <- elements[size(pre)+1..-1]])]),
Expand Down
2 changes: 1 addition & 1 deletion src/org/rascalmpl/library/lang/xml/DOM.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public default value implode(Node x) { throw "can not implode node"(x); }

public Node toXML(node x)
= element(none(), getName(x),
[toXML(c) | c <- getChildren(x)] + [attribute(none(),"<key>","<annos[key]>") | annos := getAnnotations(x), key <- annos]);
[toXML(c) | c <- getChildren(x)] + [attribute(none(),"<key>","<params[key]>") | params := getKeywordParameters(x), key <- params]);
public default Node toXML(value x) = charData("<x> ");


Expand Down
2 changes: 1 addition & 1 deletion src/org/rascalmpl/library/util/Monitor.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ test bool unfinishedLinesAtTheEndTest() {
// repo of issue #2138
test bool printLongUnfinishedLine() {
jobStart("job", totalWork=1);
singleString = iprintToString(("" | it + "ab" | i <- [0..1000000])); // avoid concat tree printing in chunks
singleString = iprintToString(("" | it + "ab" | _ <- [0..1000000])); // avoid concat tree printing in chunks
println(singleString);
jobStep("job", "prog", work=1);
println("Done");
Expand Down
Loading