Lines Matching defs:KEYWORD
815 // Keyword Matcher
817 #define KEYWORDS(KEYWORD_GROUP, KEYWORD) \
819 KEYWORD("break", Token::BREAK) \
821 KEYWORD("case", Token::CASE) \
822 KEYWORD("catch", Token::CATCH) \
823 KEYWORD("class", Token::FUTURE_RESERVED_WORD) \
824 KEYWORD("const", Token::CONST) \
825 KEYWORD("continue", Token::CONTINUE) \
827 KEYWORD("debugger", Token::DEBUGGER) \
828 KEYWORD("default", Token::DEFAULT) \
829 KEYWORD("delete", Token::DELETE) \
830 KEYWORD("do", Token::DO) \
832 KEYWORD("else", Token::ELSE) \
833 KEYWORD("enum", Token::FUTURE_RESERVED_WORD) \
834 KEYWORD("export", harmony_modules \
836 KEYWORD("extends", Token::FUTURE_RESERVED_WORD) \
838 KEYWORD("false", Token::FALSE_LITERAL) \
839 KEYWORD("finally", Token::FINALLY) \
840 KEYWORD("for", Token::FOR) \
841 KEYWORD("function", Token::FUNCTION) \
843 KEYWORD("if", Token::IF) \
844 KEYWORD("implements", Token::FUTURE_STRICT_RESERVED_WORD) \
845 KEYWORD("import", harmony_modules \
847 KEYWORD("in", Token::IN) \
848 KEYWORD("instanceof", Token::INSTANCEOF) \
849 KEYWORD("interface", Token::FUTURE_STRICT_RESERVED_WORD) \
851 KEYWORD("let", harmony_scoping \
854 KEYWORD("new", Token::NEW) \
855 KEYWORD("null", Token::NULL_LITERAL) \
857 KEYWORD("package", Token::FUTURE_STRICT_RESERVED_WORD) \
858 KEYWORD("private", Token::FUTURE_STRICT_RESERVED_WORD) \
859 KEYWORD("protected", Token::FUTURE_STRICT_RESERVED_WORD) \
860 KEYWORD("public", Token::FUTURE_STRICT_RESERVED_WORD) \
862 KEYWORD("return", Token::RETURN) \
864 KEYWORD("static", Token::FUTURE_STRICT_RESERVED_WORD) \
865 KEYWORD("super", Token::FUTURE_RESERVED_WORD) \
866 KEYWORD("switch", Token::SWITCH) \
868 KEYWORD("this", Token::THIS) \
869 KEYWORD("throw", Token::THROW) \
870 KEYWORD("true", Token::TRUE_LITERAL) \
871 KEYWORD("try", Token::TRY) \
872 KEYWORD("typeof", Token::TYPEOF) \
874 KEYWORD("var", Token::VAR) \
875 KEYWORD("void", Token::VOID) \
877 KEYWORD("while", Token::WHILE) \
878 KEYWORD("with", Token::WITH) \
880 KEYWORD("yield", Token::FUTURE_STRICT_RESERVED_WORD)
898 #define KEYWORD(keyword, token) \
900 /* 'keyword' is a char array, so sizeof(keyword) is */ \
901 /* strlen(keyword) plus 1 for the NUL char. */ \
902 const int keyword_length = sizeof(keyword) - 1; \
906 input[1] == keyword[1] && \
907 (keyword_length <= 2 || input[2] == keyword[2]) && \
908 (keyword_length <= 3 || input[3] == keyword[3]) && \
909 (keyword_length <= 4 || input[4] == keyword[4]) && \
910 (keyword_length <= 5 || input[5] == keyword[5]) && \
911 (keyword_length <= 6 || input[6] == keyword[6]) && \
912 (keyword_length <= 7 || input[7] == keyword[7]) && \
913 (keyword_length <= 8 || input[8] == keyword[8]) && \
914 (keyword_length <= 9 || input[9] == keyword[9])) { \
918 KEYWORDS(KEYWORD_GROUP_CASE, KEYWORD)
952 // Fallthrough if no longer able to complete keyword.