MCPcopy Create free account
hub / github.com/cschanck/single-file-java / nextOrFail

Method nextOrFail

src/main/java/org/sfj/JSONOne.java:611–617  ·  view source on GitHub ↗
(TokenType target)

Source from the content-addressed store, hash-verified

609 }
610
611 public Token nextOrFail(TokenType target) throws ParseException {
612 Token tok = nextToken();
613 if (tok.type.equals(target)) {
614 return tok;
615 }
616 throw error(line, "mismatch type; looking for " + target);
617 }
618
619 void pushback(Token t) {
620 pushBack.addFirst(t);

Callers 1

listOfMapEntriesMethod · 0.80

Calls 3

nextTokenMethod · 0.95
errorMethod · 0.95
equalsMethod · 0.45

Tested by

no test coverage detected