MCPcopy Create free account
hub / github.com/dynjs/dynjs / hexLiteral

Method hexLiteral

src/main/java/org/dynjs/parser/js/Lexer.java:749–765  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

747 }
748
749 protected Token hexLiteral() {
750 StringBuilder text = new StringBuilder();
751
752 text.append((char) consume()); // 0
753 text.append((char) consume()); // x
754
755 while (true) {
756 int c = la();
757 if ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F')) {
758 text.append((char) consume());
759 } else {
760 break;
761 }
762 }
763
764 return newToken(HEX_LITERAL, text.toString());
765 }
766
767 protected Token stringLiteral(char type) {
768 StringBuilder text = new StringBuilder();

Callers 2

numericLiteralMethod · 0.95
primaryExpressionMethod · 0.45

Calls 5

consumeMethod · 0.95
laMethod · 0.95
newTokenMethod · 0.95
appendMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected