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

Method type

chapter11/src/main/java/com/seaofnodes/simple/Parser.java:438–449  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

436
437 // Parse a type-or-null
438 private Type type() {
439 int old = _lexer._position;
440 String tname = _lexer.matchId();
441 if( tname==null ) return null;
442 if( tname.equals("int") ) return TypeInteger.BOT;
443 TypeStruct obj = OBJS.get(tname);
444 if( obj != null )
445 return TypeMemPtr.make(obj,match("?"));
446 // Not a type; unwind the parse
447 _lexer._position = old;
448 return null;
449 }
450
451 /**
452 * Parses a declStatement

Callers 1

Calls 5

makeMethod · 0.95
matchMethod · 0.95
matchIdMethod · 0.45
equalsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected