MCPcopy Create free account
hub / github.com/SeaOfNodes/Simple / parse

Method parse

chapter01/src/main/java/com/seaofnodes/simple/Parser.java:33–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31 _lexer = new Lexer(source);
32 Node.reset();
33 START = new StartNode();
34 }
35
36 public ReturnNode parse() {
37 var ret = (ReturnNode) parseStatement();
38 if (!_lexer.isEOF()) throw error("Syntax error, unexpected " + _lexer.getAnyNextToken());
39 return ret;
40 }

Callers 9

testSimpleProgramMethod · 0.95
testZeroMethod · 0.95
testBad1Method · 0.45
testBad2Method · 0.45
testBad3Method · 0.45
testBad4Method · 0.45
testBad5Method · 0.45
testBad6Method · 0.45
testBad7Method · 0.45

Calls 4

parseStatementMethod · 0.95
errorMethod · 0.95
isEOFMethod · 0.45
getAnyNextTokenMethod · 0.45

Tested by 9

testSimpleProgramMethod · 0.76
testZeroMethod · 0.76
testBad1Method · 0.36
testBad2Method · 0.36
testBad3Method · 0.36
testBad4Method · 0.36
testBad5Method · 0.36
testBad6Method · 0.36
testBad7Method · 0.36