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

Method Parser

chapter12/src/main/java/com/seaofnodes/simple/Parser.java:83–97  ·  view source on GitHub ↗
(String source, TypeInteger arg)

Source from the content-addressed store, hash-verified

81 public static HashMap<String, Type> TYPES = new HashMap<>();
82
83 public Parser(String source, TypeInteger arg) {
84 Node.reset();
85 IterPeeps.reset();
86 TYPES.clear();
87 TYPES.put("int",TypeInteger.BOT);
88 TYPES.put("flt",TypeFloat .BOT);
89 SCHEDULED = false;
90 _lexer = new Lexer(source);
91 _scope = new ScopeNode();
92 _continueScope = _breakScope = null;
93 START = new StartNode(new Type[]{ Type.CONTROL, arg });
94 STOP = new StopNode(source);
95 ZERO = new ConstantNode(TypeInteger.constant(0)).peephole().keep();
96 XCTRL= new XCtrlNode().peephole().keep();
97 }
98
99 public Parser(String source) {
100 this(source, TypeInteger.BOT);

Callers

nothing calls this directly

Calls 7

resetMethod · 0.95
resetMethod · 0.95
constantMethod · 0.95
clearMethod · 0.45
putMethod · 0.45
keepMethod · 0.45
peepholeMethod · 0.45

Tested by

no test coverage detected