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

Class ArrayParser

src/stone/ArrayParser.java:6–14  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4import stone.ast.*;
5
6@Reviser public class ArrayParser extends FuncParser {
7 Parser elements = rule(ArrayLiteral.class)
8 .ast(expr).repeat(rule().sep(",").ast(expr));
9 public ArrayParser() {
10 reserved.add("]");
11 primary.insertChoice(rule().sep("[").maybe(elements).sep("]"));
12 postfix.insertChoice(rule(ArrayRef.class).sep("[").ast(expr).sep("]"));
13 }
14}

Callers

nothing calls this directly

Calls 4

repeatMethod · 0.80
astMethod · 0.80
ruleMethod · 0.80
sepMethod · 0.80

Tested by

no test coverage detected