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

Method stringToken

src/main/java/org/sfj/JSONOne.java:767–777  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

765 }
766
767 private Token stringToken() {
768 StringBuilder lit = new StringBuilder();
769 for (char p = advance(); p != '"'; p = advance()) {
770 if (p == '\\') {
771 escape(lit);
772 } else {
773 lit.append(p);
774 }
775 }
776 return token(TokenType.STRING, lit.toString());
777 }
778
779 private void escape(StringBuilder lit) {
780 char p = advance();

Callers 1

nextTokenMethod · 0.95

Calls 5

advanceMethod · 0.95
escapeMethod · 0.95
tokenMethod · 0.95
appendMethod · 0.65
toStringMethod · 0.45

Tested by

no test coverage detected