Changeset View
Changeset View
Standalone View
Standalone View
support/xhpast/ast.hpp
Show All 13 Lines | yy_extra_type() { | ||||
lineno = 1; | lineno = 1; | ||||
terminated = false; | terminated = false; | ||||
last_token = -1; | last_token = -1; | ||||
insert_token = -1; | insert_token = -1; | ||||
heredoc_yyleng = -1; | heredoc_yyleng = -1; | ||||
short_tags = true; | short_tags = true; | ||||
asp_tags = false; | asp_tags = false; | ||||
idx_expr = false; | idx_expr = false; | ||||
include_debug = false; | |||||
list_size = 0; | list_size = 0; | ||||
pushStack(); | pushStack(); | ||||
} | } | ||||
bool short_tags; // `short_open_tag` in php.ini | bool short_tags; // `short_open_tag` in php.ini | ||||
bool asp_tags; // `asp_tags` in php.ini | bool asp_tags; // `asp_tags` in php.ini | ||||
bool idx_expr; // allow code like `foo()['bar']` | bool idx_expr; // allow code like `foo()['bar']` | ||||
size_t first_lineno; // line number before scanning the current token | size_t first_lineno; // line number before scanning the current token | ||||
size_t lineno; // current line number being scanned. | size_t lineno; // current line number being scanned. | ||||
std::string error; // description of error (if terminated true) | std::string error; // description of error (if terminated true) | ||||
bool terminated; // becomes true when the parser terminates with an error | bool terminated; // becomes true when the parser terminates with an error | ||||
int last_token; // the last token to be returned by the scanner | int last_token; // the last token to be returned by the scanner | ||||
int insert_token; // insert this token without reading from buffer | int insert_token; // insert this token without reading from buffer | ||||
size_t heredoc_yyleng; // last length of yytext while scanning | size_t heredoc_yyleng; // last length of yytext while scanning | ||||
std::string heredoc_label; // heredoc sentinel label | std::string heredoc_label; // heredoc sentinel label | ||||
std::stack<int> curly_stack; // tokens appearing before a { | std::stack<int> curly_stack; // tokens appearing before a { | ||||
unsigned int list_size; | unsigned int list_size; | ||||
// Include line numbers and file names in XHP object creation. | |||||
bool include_debug; | |||||
xhpast::token_list_t token_list; | xhpast::token_list_t token_list; | ||||
/* Utility functions for checking proper tag closing */ | /* Utility functions for checking proper tag closing */ | ||||
bool haveTag() { | bool haveTag() { | ||||
return !tag_stack.front().empty(); | return !tag_stack.front().empty(); | ||||
} | } | ||||
const std::string &peekTag() { | const std::string &peekTag() { | ||||
return tag_stack.front().front(); | return tag_stack.front().front(); | ||||
Show All 31 Lines |