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

Method parse

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

Source from the content-addressed store, hash-verified

191 factor = exp;
192 }
193 public void parse(Lexer lexer, List<ASTree> res) throws ParseException {
194 ASTree right = factor.parse(lexer);
195 Precedence prec;
196 while ((prec = nextOperator(lexer)) != null)
197 right = doShift(lexer, right, prec.value);
198
199 res.add(right);
200 }
201 private ASTree doShift(Lexer lexer, ASTree left, int prec)
202 throws ParseException
203 {

Callers

nothing calls this directly

Calls 4

nextOperatorMethod · 0.95
doShiftMethod · 0.95
parseMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected