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

Method parse

src/stone/Parser.java:90–100  ·  view source on GitHub ↗
(Lexer lexer, List<ASTree> res)

Source from the content-addressed store, hash-verified

88 factory = Factory.get(type, Token.class);
89 }
90 protected void parse(Lexer lexer, List<ASTree> res)
91 throws ParseException
92 {
93 Token t = lexer.read();
94 if (test(t)) {
95 ASTree leaf = factory.make(t);
96 res.add(leaf);
97 }
98 else
99 throw new ParseException(t);
100 }
101 protected boolean match(Lexer lexer) throws ParseException {
102 return test(lexer.peek(0));
103 }

Callers

nothing calls this directly

Calls 4

testMethod · 0.95
makeMethod · 0.80
readMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected