| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521 |
- //-------------------------------------------------------------------------------------------------------
- // Copyright (C) Microsoft. All rights reserved.
- // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
- //-------------------------------------------------------------------------------------------------------
- // GENERATED FILE, DO NOT HAND-MODIFY!
- // Generated with the following command line: wscript jsscan.js kwd-lsc.h kwd-swtch.h
- // This should be regenerated whenever the keywords change.
- case 'a':
- if (identifyKwds)
- {
- switch (p[0]) {
- case 'w':
- if (p[1] == 'a' && p[2] == 'i' && p[3] == 't' && !IsIdContinueNext(p+4, last)) {
- p += 4;
- if (this->m_fAwaitIsKeyword || !this->m_parser || this->m_parser->IsStrictMode()) {
- token = tkAWAIT;
- goto LReserved;
- }
- goto LIdentifier;
- }
- break;
- case 'r':
- if (p[1] == 'g' && p[2] == 'u' && p[3] == 'm' && p[4] == 'e' && p[5] == 'n' && p[6] == 't' && p[7] == 's' && !IsIdContinueNext(p+8, last)) {
- p += 8;
- goto LArguments;
- }
- break;
- }
- }
- goto LIdentifier;
- case 'b':
- if (identifyKwds)
- {
- if (p[0] == 'r' && p[1] == 'e' && p[2] == 'a' && p[3] == 'k' && !IsIdContinueNext(p+4, last)) {
- p += 4;
- token = tkBREAK;
- goto LReserved;
- }
- }
- goto LIdentifier;
- case 'c':
- if (identifyKwds)
- {
- switch (p[0]) {
- case 'a':
- switch (p[1]) {
- case 's':
- if (p[2] == 'e' && !IsIdContinueNext(p+3, last)) {
- p += 3;
- token = tkCASE;
- goto LReserved;
- }
- break;
- case 't':
- if (p[2] == 'c' && p[3] == 'h' && !IsIdContinueNext(p+4, last)) {
- p += 4;
- token = tkCATCH;
- goto LReserved;
- }
- break;
- }
- break;
- case 'o':
- if (p[1] == 'n') {
- switch (p[2]) {
- case 't':
- if (p[3] == 'i' && p[4] == 'n' && p[5] == 'u' && p[6] == 'e' && !IsIdContinueNext(p+7, last)) {
- p += 7;
- token = tkCONTINUE;
- goto LReserved;
- }
- break;
- case 's':
- if (p[3] == 't' && !IsIdContinueNext(p+4, last)) {
- p += 4;
- token = tkCONST;
- goto LReserved;
- }
- break;
- }
- }
- break;
- case 'l':
- if (p[1] == 'a' && p[2] == 's' && p[3] == 's' && !IsIdContinueNext(p+4, last)) {
- p += 4;
- token = tkCLASS;
- goto LReserved;
- }
- break;
- }
- }
- goto LIdentifier;
- case 'd':
- if (identifyKwds)
- {
- switch (p[0]) {
- case 'e':
- switch (p[1]) {
- case 'b':
- if (p[2] == 'u' && p[3] == 'g' && p[4] == 'g' && p[5] == 'e' && p[6] == 'r' && !IsIdContinueNext(p+7, last)) {
- p += 7;
- token = tkDEBUGGER;
- goto LReserved;
- }
- break;
- case 'f':
- if (p[2] == 'a' && p[3] == 'u' && p[4] == 'l' && p[5] == 't' && !IsIdContinueNext(p+6, last)) {
- p += 6;
- token = tkDEFAULT;
- goto LReserved;
- }
- break;
- case 'l':
- if (p[2] == 'e' && p[3] == 't' && p[4] == 'e' && !IsIdContinueNext(p+5, last)) {
- p += 5;
- token = tkDELETE;
- goto LReserved;
- }
- break;
- }
- break;
- case 'o':
- if (!IsIdContinueNext(p+1, last)) {
- p += 1;
- token = tkDO;
- goto LReserved;
- }
- break;
- }
- }
- goto LIdentifier;
- case 'e':
- if (identifyKwds)
- {
- switch (p[0]) {
- case 'l':
- if (p[1] == 's' && p[2] == 'e' && !IsIdContinueNext(p+3, last)) {
- p += 3;
- token = tkELSE;
- goto LReserved;
- }
- break;
- case 'x':
- switch (p[1]) {
- case 'p':
- if (p[2] == 'o' && p[3] == 'r' && p[4] == 't' && !IsIdContinueNext(p+5, last)) {
- p += 5;
- token = tkEXPORT;
- goto LReserved;
- }
- break;
- case 't':
- if (p[2] == 'e' && p[3] == 'n' && p[4] == 'd' && p[5] == 's' && !IsIdContinueNext(p+6, last)) {
- p += 6;
- token = tkEXTENDS;
- goto LReserved;
- }
- break;
- }
- break;
- case 'n':
- if (p[1] == 'u' && p[2] == 'm' && !IsIdContinueNext(p+3, last)) {
- p += 3;
- token = tkENUM;
- goto LReserved;
- }
- break;
- case 'v':
- if (p[1] == 'a' && p[2] == 'l' && !IsIdContinueNext(p+3, last)) {
- p += 3;
- goto LEval;
- }
- break;
- }
- }
- goto LIdentifier;
- case 'f':
- if (identifyKwds)
- {
- switch (p[0]) {
- case 'a':
- if (p[1] == 'l' && p[2] == 's' && p[3] == 'e' && !IsIdContinueNext(p+4, last)) {
- p += 4;
- token = tkFALSE;
- goto LReserved;
- }
- break;
- case 'i':
- if (p[1] == 'n' && p[2] == 'a' && p[3] == 'l' && p[4] == 'l' && p[5] == 'y' && !IsIdContinueNext(p+6, last)) {
- p += 6;
- token = tkFINALLY;
- goto LReserved;
- }
- break;
- case 'o':
- if (p[1] == 'r' && !IsIdContinueNext(p+2, last)) {
- p += 2;
- token = tkFOR;
- goto LReserved;
- }
- break;
- case 'u':
- if (p[1] == 'n' && p[2] == 'c' && p[3] == 't' && p[4] == 'i' && p[5] == 'o' && p[6] == 'n' && !IsIdContinueNext(p+7, last)) {
- p += 7;
- token = tkFUNCTION;
- goto LReserved;
- }
- break;
- }
- }
- goto LIdentifier;
- case 'i':
- if (identifyKwds)
- {
- switch (p[0]) {
- case 'f':
- if (!IsIdContinueNext(p+1, last)) {
- p += 1;
- token = tkIF;
- goto LReserved;
- }
- break;
- case 'n':
- switch (p[1]) {
- case 's':
- if (p[2] == 't' && p[3] == 'a' && p[4] == 'n' && p[5] == 'c' && p[6] == 'e' && p[7] == 'o' && p[8] == 'f' && !IsIdContinueNext(p+9, last)) {
- p += 9;
- token = tkINSTANCEOF;
- goto LReserved;
- }
- break;
- case 't':
- if (p[2] == 'e' && p[3] == 'r' && p[4] == 'f' && p[5] == 'a' && p[6] == 'c' && p[7] == 'e' && !IsIdContinueNext(p+8, last)) {
- p += 8;
- if (!this->m_parser || this->m_parser->IsStrictMode()) {
- token = tkINTERFACE;
- goto LReserved;
- }
- goto LIdentifier;
- }
- break;
- }
- if (!IsIdContinueNext(p+1,last)) {
- p += 1;
- token = tkIN;
- goto LReserved;
- }
- break;
- case 'm':
- if (p[1] == 'p') {
- switch (p[2]) {
- case 'o':
- if (p[3] == 'r' && p[4] == 't' && !IsIdContinueNext(p+5, last)) {
- p += 5;
- token = tkIMPORT;
- goto LReserved;
- }
- break;
- case 'l':
- if (p[3] == 'e' && p[4] == 'm' && p[5] == 'e' && p[6] == 'n' && p[7] == 't' && p[8] == 's' && !IsIdContinueNext(p+9, last)) {
- p += 9;
- if (!this->m_parser || this->m_parser->IsStrictMode()) {
- token = tkIMPLEMENTS;
- goto LReserved;
- }
- goto LIdentifier;
- }
- break;
- }
- }
- break;
- }
- }
- goto LIdentifier;
- case 'n':
- if (identifyKwds)
- {
- switch (p[0]) {
- case 'e':
- if (p[1] == 'w' && !IsIdContinueNext(p+2, last)) {
- p += 2;
- token = tkNEW;
- goto LReserved;
- }
- break;
- case 'u':
- if (p[1] == 'l' && p[2] == 'l' && !IsIdContinueNext(p+3, last)) {
- p += 3;
- token = tkNULL;
- goto LReserved;
- }
- break;
- }
- }
- goto LIdentifier;
- case 'r':
- if (identifyKwds)
- {
- if (p[0] == 'e' && p[1] == 't' && p[2] == 'u' && p[3] == 'r' && p[4] == 'n' && !IsIdContinueNext(p+5, last)) {
- p += 5;
- token = tkRETURN;
- goto LReserved;
- }
- }
- goto LIdentifier;
- case 's':
- if (identifyKwds)
- {
- switch (p[0]) {
- case 'w':
- if (p[1] == 'i' && p[2] == 't' && p[3] == 'c' && p[4] == 'h' && !IsIdContinueNext(p+5, last)) {
- p += 5;
- token = tkSWITCH;
- goto LReserved;
- }
- break;
- case 'u':
- if (p[1] == 'p' && p[2] == 'e' && p[3] == 'r' && !IsIdContinueNext(p+4, last)) {
- p += 4;
- token = tkSUPER;
- goto LReserved;
- }
- break;
- case 't':
- if (p[1] == 'a' && p[2] == 't' && p[3] == 'i' && p[4] == 'c' && !IsIdContinueNext(p+5, last)) {
- p += 5;
- if (!this->m_parser || this->m_parser->IsStrictMode()) {
- token = tkSTATIC;
- goto LReserved;
- }
- goto LIdentifier;
- }
- break;
- }
- }
- goto LIdentifier;
- case 't':
- if (identifyKwds)
- {
- switch (p[0]) {
- case 'h':
- switch (p[1]) {
- case 'i':
- if (p[2] == 's' && !IsIdContinueNext(p+3, last)) {
- p += 3;
- token = tkTHIS;
- goto LReserved;
- }
- break;
- case 'r':
- if (p[2] == 'o' && p[3] == 'w' && !IsIdContinueNext(p+4, last)) {
- p += 4;
- token = tkTHROW;
- goto LReserved;
- }
- break;
- }
- break;
- case 'r':
- switch (p[1]) {
- case 'u':
- if (p[2] == 'e' && !IsIdContinueNext(p+3, last)) {
- p += 3;
- token = tkTRUE;
- goto LReserved;
- }
- break;
- case 'y':
- if (!IsIdContinueNext(p+2, last)) {
- p += 2;
- token = tkTRY;
- goto LReserved;
- }
- break;
- }
- break;
- case 'y':
- if (p[1] == 'p' && p[2] == 'e' && p[3] == 'o' && p[4] == 'f' && !IsIdContinueNext(p+5, last)) {
- p += 5;
- token = tkTYPEOF;
- goto LReserved;
- }
- break;
- case 'a':
- if (p[1] == 'r' && p[2] == 'g' && p[3] == 'e' && p[4] == 't' && !IsIdContinueNext(p+5, last)) {
- p += 5;
- goto LTarget;
- }
- break;
- }
- }
- goto LIdentifier;
- case 'v':
- if (identifyKwds)
- {
- switch (p[0]) {
- case 'a':
- if (p[1] == 'r' && !IsIdContinueNext(p+2, last)) {
- p += 2;
- token = tkVAR;
- goto LReserved;
- }
- break;
- case 'o':
- if (p[1] == 'i' && p[2] == 'd' && !IsIdContinueNext(p+3, last)) {
- p += 3;
- token = tkVOID;
- goto LReserved;
- }
- break;
- }
- }
- goto LIdentifier;
- case 'w':
- if (identifyKwds)
- {
- switch (p[0]) {
- case 'h':
- if (p[1] == 'i' && p[2] == 'l' && p[3] == 'e' && !IsIdContinueNext(p+4, last)) {
- p += 4;
- token = tkWHILE;
- goto LReserved;
- }
- break;
- case 'i':
- if (p[1] == 't' && p[2] == 'h' && !IsIdContinueNext(p+3, last)) {
- p += 3;
- token = tkWITH;
- goto LReserved;
- }
- break;
- }
- }
- goto LIdentifier;
- case 'y':
- if (identifyKwds)
- {
- if (p[0] == 'i' && p[1] == 'e' && p[2] == 'l' && p[3] == 'd' && !IsIdContinueNext(p+4, last)) {
- p += 4;
- if (this->m_fYieldIsKeyword || !this->m_parser || this->m_parser->IsStrictMode()) {
- token = tkYIELD;
- goto LReserved;
- }
- goto LIdentifier;
- }
- }
- goto LIdentifier;
- case 'l':
- if (identifyKwds)
- {
- if (p[0] == 'e' && p[1] == 't' && !IsIdContinueNext(p+2, last)) {
- p += 2;
- if (!this->m_parser || this->m_parser->IsStrictMode()) {
- token = tkLET;
- goto LReserved;
- }
- goto LIdentifier;
- }
- }
- goto LIdentifier;
- case 'p':
- if (identifyKwds)
- {
- switch (p[0]) {
- case 'a':
- if (p[1] == 'c' && p[2] == 'k' && p[3] == 'a' && p[4] == 'g' && p[5] == 'e' && !IsIdContinueNext(p+6, last)) {
- p += 6;
- if (!this->m_parser || this->m_parser->IsStrictMode()) {
- token = tkPACKAGE;
- goto LReserved;
- }
- goto LIdentifier;
- }
- break;
- case 'r':
- switch (p[1]) {
- case 'i':
- if (p[2] == 'v' && p[3] == 'a' && p[4] == 't' && p[5] == 'e' && !IsIdContinueNext(p+6, last)) {
- p += 6;
- if (!this->m_parser || this->m_parser->IsStrictMode()) {
- token = tkPRIVATE;
- goto LReserved;
- }
- goto LIdentifier;
- }
- break;
- case 'o':
- if (p[2] == 't' && p[3] == 'e' && p[4] == 'c' && p[5] == 't' && p[6] == 'e' && p[7] == 'd' && !IsIdContinueNext(p+8, last)) {
- p += 8;
- if (!this->m_parser || this->m_parser->IsStrictMode()) {
- token = tkPROTECTED;
- goto LReserved;
- }
- goto LIdentifier;
- }
- break;
- }
- break;
- case 'u':
- if (p[1] == 'b' && p[2] == 'l' && p[3] == 'i' && p[4] == 'c' && !IsIdContinueNext(p+5, last)) {
- p += 5;
- if (!this->m_parser || this->m_parser->IsStrictMode()) {
- token = tkPUBLIC;
- goto LReserved;
- }
- goto LIdentifier;
- }
- break;
- }
- }
- goto LIdentifier;
- // characters not in a reserved word
- case 'g': case 'h': case 'j':
- case 'k': case 'm': case 'o':
- case 'q':
- case 'u': case 'x':
- case 'z':
- goto LIdentifier;
|