diff --git a/bird-core/src/main/rascal/lang/bird/Checker.rsc b/bird-core/src/main/rascal/lang/bird/Checker.rsc index 24db878..7b2214a 100644 --- a/bird-core/src/main/rascal/lang/bird/Checker.rsc +++ b/bird-core/src/main/rascal/lang/bird/Checker.rsc @@ -1007,8 +1007,10 @@ void collectInfixOperation(Tree current, str op, AType (AType,AType) infixFun, T } // ---- Examples & Tests -------------------------------- -TModel birdTModelFromTree(Tree pt, bool debug = false, bool testing=false, PathConfig pathConf = pathConfig(pt.src)){ - if (pt has top) pt = pt.top; +TModel birdTModelFromTree(start[Program] pt, bool debug = false, bool testing=false, PathConfig pathConf = pathConfig(pt.src)) + = birdTModelFromTree(pt.top, debug=debug, testing=testing, pathConf=pathConf); + +default TModel birdTModelFromTree(Tree pt, bool debug = false, bool testing=false, PathConfig pathConf = pathConfig(pt.src)){ c = newCollector("collectAndSolve", pt, getBirdConfig(debug = debug)); // TODO get more meaningfull name c.push(TESTING, testing); //println("Bird: Version 1.0"); @@ -1097,4 +1099,4 @@ void runTests(loc target = |project://bird-nescio-tests/bird-src|, PathConfig pc ' Typechecking: ' Other: "); -} \ No newline at end of file +}