diff --git a/src/org/rascalmpl/library/lang/box/util/Tree2Box.rsc b/src/org/rascalmpl/library/lang/box/util/Tree2Box.rsc index 6aff94d64e0..f41e812d152 100644 --- a/src/org/rascalmpl/library/lang/box/util/Tree2Box.rsc +++ b/src/org/rascalmpl/library/lang/box/util/Tree2Box.rsc @@ -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 () { @@ -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 : + case : return NULL(); // if we are given a comment node, then we can format it here for use by layoutDiff @@ -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 : + case : 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]])]), diff --git a/src/org/rascalmpl/library/lang/xml/DOM.rsc b/src/org/rascalmpl/library/lang/xml/DOM.rsc index cd72f90c928..f8790348ff4 100644 --- a/src/org/rascalmpl/library/lang/xml/DOM.rsc +++ b/src/org/rascalmpl/library/lang/xml/DOM.rsc @@ -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(),"","") | annos := getAnnotations(x), key <- annos]); + [toXML(c) | c <- getChildren(x)] + [attribute(none(),"","") | params := getKeywordParameters(x), key <- params]); public default Node toXML(value x) = charData(" "); diff --git a/src/org/rascalmpl/library/util/Monitor.rsc b/src/org/rascalmpl/library/util/Monitor.rsc index 1108aa4bc4a..59a6f5aec15 100644 --- a/src/org/rascalmpl/library/util/Monitor.rsc +++ b/src/org/rascalmpl/library/util/Monitor.rsc @@ -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");