v8  3.11.10(node0.8.26)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
scanner.cc File Reference
#include "scanner.h"
#include "../include/v8stdint.h"
#include "char-predicates-inl.h"
Include dependency graph for scanner.cc:

Go to the source code of this file.

Namespaces

 v8
 
 v8::internal
 

Macros

#define KEYWORDS(KEYWORD_GROUP, KEYWORD)
 
#define KEYWORD_GROUP_CASE(ch)
 
#define KEYWORD(keyword, token)
 

Functions

 STATIC_ASSERT (Token::NUM_TOKENS<=0x100)
 

Macro Definition Documentation

#define KEYWORD (   keyword,
  token 
)
Value:
{ \
/* 'keyword' is a char array, so sizeof(keyword) is */ \
/* strlen(keyword) plus 1 for the NUL char. */ \
const int keyword_length = sizeof(keyword) - 1; \
STATIC_ASSERT(keyword_length >= kMinLength); \
STATIC_ASSERT(keyword_length <= kMaxLength); \
if (input_length == keyword_length && \
input[1] == keyword[1] && \
(keyword_length <= 2 || input[2] == keyword[2]) && \
(keyword_length <= 3 || input[3] == keyword[3]) && \
(keyword_length <= 4 || input[4] == keyword[4]) && \
(keyword_length <= 5 || input[5] == keyword[5]) && \
(keyword_length <= 6 || input[6] == keyword[6]) && \
(keyword_length <= 7 || input[7] == keyword[7]) && \
(keyword_length <= 8 || input[8] == keyword[8]) && \
(keyword_length <= 9 || input[9] == keyword[9])) { \
return token; \
} \
}
#define STATIC_ASSERT(test)
Definition: checks.h:283
#define KEYWORD_GROUP_CASE (   ch)
Value:
break; \
case ch:
#define KEYWORDS (   KEYWORD_GROUP,
  KEYWORD 
)

Definition at line 817 of file scanner.cc.