Lines Matching defs:KEYWORD
903 // Keyword Matcher
905 #define KEYWORDS(KEYWORD_GROUP, KEYWORD) \
907 KEYWORD("break", Token::BREAK) \
909 KEYWORD("case", Token::CASE) \
910 KEYWORD("catch", Token::CATCH) \
911 KEYWORD("class", \
913 KEYWORD("const", Token::CONST) \
914 KEYWORD("continue", Token::CONTINUE) \
916 KEYWORD("debugger", Token::DEBUGGER) \
917 KEYWORD("default", Token::DEFAULT) \
918 KEYWORD("delete", Token::DELETE) \
919 KEYWORD("do", Token::DO) \
921 KEYWORD("else", Token::ELSE) \
922 KEYWORD("enum", Token::FUTURE_RESERVED_WORD) \
923 KEYWORD("export", \
925 KEYWORD("extends", \
928 KEYWORD("false", Token::FALSE_LITERAL) \
929 KEYWORD("finally", Token::FINALLY) \
930 KEYWORD("for", Token::FOR) \
931 KEYWORD("function", Token::FUNCTION) \
933 KEYWORD("if", Token::IF) \
934 KEYWORD("implements", Token::FUTURE_STRICT_RESERVED_WORD) \
935 KEYWORD("import", \
937 KEYWORD("in", Token::IN) \
938 KEYWORD("instanceof", Token::INSTANCEOF) \
939 KEYWORD("interface", Token::FUTURE_STRICT_RESERVED_WORD) \
941 KEYWORD("let", \
944 KEYWORD("new", Token::NEW) \
945 KEYWORD("null", Token::NULL_LITERAL) \
947 KEYWORD("package", Token::FUTURE_STRICT_RESERVED_WORD) \
948 KEYWORD("private", Token::FUTURE_STRICT_RESERVED_WORD) \
949 KEYWORD("protected", Token::FUTURE_STRICT_RESERVED_WORD) \
950 KEYWORD("public", Token::FUTURE_STRICT_RESERVED_WORD) \
952 KEYWORD("return", Token::RETURN) \
954 KEYWORD("static", harmony_classes ? Token::STATIC \
956 KEYWORD("super", \
958 KEYWORD("switch", Token::SWITCH) \
960 KEYWORD("this", Token::THIS) \
961 KEYWORD("throw", Token::THROW) \
962 KEYWORD("true", Token::TRUE_LITERAL) \
963 KEYWORD("try", Token::TRY) \
964 KEYWORD("typeof", Token::TYPEOF) \
966 KEYWORD("var", Token::VAR) \
967 KEYWORD("void", Token::VOID) \
969 KEYWORD("while", Token::WHILE) \
970 KEYWORD("with", Token::WITH) \
972 KEYWORD("yield", Token::YIELD)
991 #define KEYWORD(keyword, token) \
993 /* 'keyword' is a char array, so sizeof(keyword) is */ \
994 /* strlen(keyword) plus 1 for the NUL char. */ \
995 const int keyword_length = sizeof(keyword) - 1; \
999 input[1] == keyword[1] && \
1000 (keyword_length <= 2 || input[2] == keyword[2]) && \
1001 (keyword_length <= 3 || input[3] == keyword[3]) && \
1002 (keyword_length <= 4 || input[4] == keyword[4]) && \
1003 (keyword_length <= 5 || input[5] == keyword[5]) && \
1004 (keyword_length <= 6 || input[6] == keyword[6]) && \
1005 (keyword_length <= 7 || input[7] == keyword[7]) && \
1006 (keyword_length <= 8 || input[8] == keyword[8]) && \
1007 (keyword_length <= 9 || input[9] == keyword[9])) { \
1011 KEYWORDS(KEYWORD_GROUP_CASE, KEYWORD)
1056 // Fallthrough if no longer able to complete keyword.