MCPcopy Create free account
hub / github.com/chibash/stone / run

Method run

src/chap6/BasicFileInterpreter.java:15–27  ·  view source on GitHub ↗
(BasicParser bp, Environment env, String fileName)

Source from the content-addressed store, hash-verified

13 }
14
15 public static void run(BasicParser bp, Environment env, String fileName)
16 throws ParseException, FileNotFoundException
17 {
18 FileReader reader = new FileReader(fileName);
19 Lexer lexer = new Lexer(reader);
20 while (lexer.peek(0) != Token.EOF) {
21 ASTree t = bp.parse(lexer);
22 if (!(t instanceof NullStmnt)) {
23 Object r = ((BasicEvaluator.ASTreeEx)t).eval(env);
24 System.out.println("=> " + r);
25 }
26 }
27 }
28}

Callers 1

mainMethod · 0.95

Calls 3

peekMethod · 0.95
parseMethod · 0.45
evalMethod · 0.45

Tested by

no test coverage detected