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

Method parse

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

Source from the content-addressed store, hash-verified

65 protected boolean onlyOnce;
66 protected Repeat(Parser p, boolean once) { parser = p; onlyOnce = once; }
67 protected void parse(Lexer lexer, List<ASTree> res)
68 throws ParseException
69 {
70 while (parser.match(lexer)) {
71 ASTree t = parser.parse(lexer);
72 if (t.getClass() != ASTList.class || t.numChildren() > 0)
73 res.add(t);
74 if (onlyOnce)
75 break;
76 }
77 }
78 protected boolean match(Lexer lexer) throws ParseException {
79 return parser.match(lexer);
80 }

Callers

nothing calls this directly

Calls 4

numChildrenMethod · 0.95
matchMethod · 0.45
parseMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected