()
| 143614 | return source.slice(start, index); |
| 143615 | } |
| 143616 | function scanIdentifier() { |
| 143617 | var start, id, type; |
| 143618 | start = index; // Backslash (U+005C) starts an escaped character. |
| 143619 | id = source.charCodeAt(index) === 0x5C ? getEscapedIdentifier() : getIdentifier(); // There is no keyword or literal with only one character. |
| 143620 | // Thus, it must be an identifier. |
| 143621 | if (id.length === 1) type = TokenIdentifier; |
| 143622 | else if (keywords.hasOwnProperty(id)) // eslint-disable-line no-prototype-builtins |
| 143623 | type = TokenKeyword; |
| 143624 | else if (id === "null") type = TokenNullLiteral; |
| 143625 | else if (id === "true" || id === "false") type = TokenBooleanLiteral; |
| 143626 | else type = TokenIdentifier; |
| 143627 | return { |
| 143628 | type: type, |
| 143629 | value: id, |
| 143630 | start: start, |
| 143631 | end: index |
| 143632 | }; |
| 143633 | } // 7.7 Punctuators |
| 143634 | function scanPunctuator() { |
| 143635 | var start = index, code = source.charCodeAt(index), code2, ch1 = source[index], ch2, ch3, ch4; |
| 143636 | switch(code){ |
no test coverage detected