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

Method octalEscapeSequence

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

Source from the content-addressed store, hash-verified

918 }
919
920 protected String octalEscapeSequence() {
921 StringBuilder text = new StringBuilder();
922 consume(); // \
923
924 text.append(octalDigit());
925
926 if (isOctalDigit(la())) {
927 text.append(octalDigit());
928
929 if (isOctalDigit(la())) {
930 text.append(octalDigit());
931 }
932 }
933 // decode it in same way like for HexEscape
934 //
935 int code = Integer.decode(text.toString());
936 return Character.toString((char) code);
937 }
938
939 protected boolean isOctalDigit(int c) {
940 if (c >= '0' && c <= '7') {

Callers 1

stringLiteralMethod · 0.95

Calls 7

consumeMethod · 0.95
octalDigitMethod · 0.95
isOctalDigitMethod · 0.95
laMethod · 0.95
appendMethod · 0.80
decodeMethod · 0.80
toStringMethod · 0.45

Tested by

no test coverage detected