Skip to content

Commit

Permalink
Test examples
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKlint committed Sep 1, 2024
1 parent 1a73195 commit 86edcae
Showing 1 changed file with 21 additions and 49 deletions.
Original file line number Diff line number Diff line change
@@ -1,59 +1,31 @@
module lang::rascalcore::compile::Examples::Tst4
import analysis::diff::TextEdits;

//int chartServer(str s, bool b = false)
// = chartServer(d(s, b));
//
//int chartServer(D d) = 0;

//int outer2(int t, int tabSize=4){
// int rec(int t, int innerKwp = 5) = t + tabSize + innerKwp when t > 10;
// default int rec(int t) = t;
//// return rec(t);
//}

//int outer4(int t, int tabSize=4){
// int rec(int t){
// int rec_inner(int t, int innerKwp = 5) = t + tabSize + innerKwp when t > 10;
// default int rec_inner(int t) = t;
// return rec_inner(t);
// }
// return rec(t);
//}
import ParseTree;
value main() //test bool reifyParameterWithBound()
= #&T <: list[&U].symbol;// == \parameter("T", \list(\parameter("U",\value())));

//int outer2(int t, int tabSize=4){
// int rec(int t, int innerKwp = 5) = t + tabSize + innerKwp when t > 10;
// default int rec(int t) = t;
// return rec(t);
//}
//
//test bool outer2_1() = outer2(1) == 1;

//import lang::html::IO;
//import lang::rascal::format::Grammar;
//import util::IDEServices;
//import Content;
//import ValueIO;
//
//Response (Request) valueServer(value v) {
// Response reply(get(/^\/editor/, parameters=pms)) {
// if (pms["src"]?) {
// edit(readTextValueString(#loc, pms["src"]));
// return response(writeHTMLString(text("done")));
// }
//
// return response(writeHTMLString(text("could not edit <pms>")));
// }
//syntax OptTestGrammar = A? a B b;
//
// default Response reply(get(_)) {
// return response(writeHTMLString(toHTML(v)));
// }
//syntax A = "a";
//syntax B = "b";
//
// return reply;
//}
//layout L = " "*;
//
//HTMLElement toHTML(value v) = text("<v>");
//value main() //test bool optionalNotPresentIsFalse()
// = !(int a <- []);
// //= !((A)`a` <- ([OptTestGrammar] "b").a);
// //= ([OptTestGrammar] "b").a;

//layout Layout = " "*;
//syntax AB = "a" | "b";
//syntax ABPlus = AB+ abs;
//syntax ABStar = AB* abs;
//syntax ABStarSep = {AB ","}* abs;
//value main() //test bool sizeABStar2()
// = size(([ABStar]"a a").abs);// == 2;
//
//int size({&E &S}* l) = (0 | it + 1 | _ <- l);
//int size(&E* l) = (0 | it + 1 | _ <- l);
//
//// ---- test1 ----
//
Expand Down

0 comments on commit 86edcae

Please sign in to comment.