Changeset View
Changeset View
Standalone View
Standalone View
support/xhpast/scanner.l
Show First 20 Lines • Show All 464 Lines • ▼ Show 20 Lines | switch (tok) { | ||||
// In PHP it's ok to use keywords such as 'if' as field names | // In PHP it's ok to use keywords such as 'if' as field names | ||||
// or function names. | // or function names. | ||||
case T_OBJECT_OPERATOR: | case T_OBJECT_OPERATOR: | ||||
case T_FUNCTION: | case T_FUNCTION: | ||||
push_state(PHP_NO_RESERVED_WORDS); | push_state(PHP_NO_RESERVED_WORDS); | ||||
break; | break; | ||||
case T_PAAMAYIM_NEKUDOTAYIM: | case T_PAAMAYIM_NEKUDOTAYIM: | ||||
if (yyextra->colon_hack) { | |||||
yyextra->colon_hack = false; | |||||
} else { | |||||
push_state(PHP_NO_RESERVED_WORDS); | push_state(PHP_NO_RESERVED_WORDS); | ||||
} | |||||
break; | break; | ||||
case '{': | case '{': | ||||
// not used anymore | // not used anymore | ||||
yyextra->curly_stack.push(tok); | yyextra->curly_stack.push(tok); | ||||
break; | break; | ||||
} | } | ||||
#ifdef DEBUG | #ifdef DEBUG | ||||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |