v8
3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
|
#include <parser.h>
Public Member Functions | |
Parser (CompilationInfo *info) | |
~Parser () | |
bool | Parse () |
Public Member Functions inherited from ParserBase< ParserTraits > | |
ParserBase (Scanner *scanner, uintptr_t stack_limit, v8::Extension *extension, ParserRecorder *log, typename ParserTraits::Type::Zone *zone, typename ParserTraits::Type::Parser this_object) | |
bool | allow_lazy () const |
bool | allow_natives_syntax () const |
bool | allow_generators () const |
bool | allow_for_of () const |
bool | allow_modules () const |
bool | allow_harmony_scoping () const |
bool | allow_harmony_numeric_literals () const |
void | set_allow_lazy (bool allow) |
void | set_allow_natives_syntax (bool allow) |
void | set_allow_generators (bool allow) |
void | set_allow_for_of (bool allow) |
void | set_allow_modules (bool allow) |
void | set_allow_harmony_scoping (bool allow) |
void | set_allow_harmony_numeric_literals (bool allow) |
Public Member Functions inherited from ParserTraits | |
ParserTraits (Parser *parser) | |
bool | IsEvalOrArguments (Handle< String > identifier) const |
void | PushPropertyName (FuncNameInferrer *fni, Expression *expression) |
void | CheckPossibleEvalCall (Expression *expression, Scope *scope) |
void | CheckStrictModeLValue (Expression *expression, bool *ok) |
bool | ShortcutNumericLiteralBinaryExpression (Expression **x, Expression *y, Token::Value op, int pos, AstNodeFactory< AstConstructionVisitor > *factory) |
Expression * | BuildUnaryExpression (Expression *expression, Token::Value op, int pos, AstNodeFactory< AstConstructionVisitor > *factory) |
void | ReportMessageAt (Scanner::Location source_location, const char *message, Vector< const char * > args, bool is_reference_error=false) |
void | ReportMessage (const char *message, Vector< Handle< String > > args, bool is_reference_error=false) |
void | ReportMessageAt (Scanner::Location source_location, const char *message, Vector< Handle< String > > args, bool is_reference_error=false) |
Literal * | GetLiteralTheHole (int position, AstNodeFactory< AstConstructionVisitor > *factory) |
Handle< String > | GetSymbol (Scanner *scanner=NULL) |
Handle< String > | NextLiteralString (Scanner *scanner, PretenureFlag tenured) |
Expression * | ThisExpression (Scope *scope, AstNodeFactory< AstConstructionVisitor > *factory) |
Literal * | ExpressionFromLiteral (Token::Value token, int pos, Scanner *scanner, AstNodeFactory< AstConstructionVisitor > *factory) |
Expression * | ExpressionFromIdentifier (Handle< String > name, int pos, Scope *scope, AstNodeFactory< AstConstructionVisitor > *factory) |
Expression * | ExpressionFromString (int pos, Scanner *scanner, AstNodeFactory< AstConstructionVisitor > *factory) |
ZoneList < v8::internal::Expression * > * | NewExpressionList (int size, Zone *zone) |
ZoneList < ObjectLiteral::Property * > * | NewPropertyList (int size, Zone *zone) |
Expression * | ParseV8Intrinsic (bool *ok) |
FunctionLiteral * | ParseFunctionLiteral (Handle< String > name, Scanner::Location function_name_location, bool name_is_strict_reserved, bool is_generator, int function_token_position, FunctionLiteral::FunctionType type, bool *ok) |
Static Public Member Functions | |
static bool | Parse (CompilationInfo *info, bool allow_lazy=false) |
Static Public Member Functions inherited from ParserTraits | |
template<typename FunctionState > | |
static void | SetUpFunctionState (FunctionState *function_state, Zone *zone) |
template<typename FunctionState > | |
static void | TearDownFunctionState (FunctionState *function_state) |
static bool | IsThisProperty (Expression *expression) |
static bool | IsIdentifier (Expression *expression) |
static bool | IsBoilerplateProperty (ObjectLiteral::Property *property) |
static bool | IsArrayIndex (Handle< String > string, uint32_t *index) |
static void | PushLiteralName (FuncNameInferrer *fni, Handle< String > id) |
static void | CheckFunctionLiteralInsideTopLevelObjectLiteral (Scope *scope, Expression *value, bool *has_function) |
static void | CheckAssigningFunctionLiteralToProperty (Expression *left, Expression *right) |
static Expression * | MarkExpressionAsLValue (Expression *expression) |
static Handle< String > | EmptyIdentifier () |
static Expression * | EmptyExpression () |
static Literal * | EmptyLiteral () |
static ZoneList< Expression * > * | NullExpressionList () |
Friends | |
class | ParserTraits |
|
explicit |
Definition at line 769 of file parser.cc.
References ASSERT, CompilationInfo::is_native(), ParserBase< ParserTraits >::set_allow_for_of(), ParserBase< ParserTraits >::set_allow_generators(), ParserBase< ParserTraits >::set_allow_harmony_numeric_literals(), ParserBase< ParserTraits >::set_allow_harmony_scoping(), ParserBase< ParserTraits >::set_allow_lazy(), ParserBase< ParserTraits >::set_allow_modules(), and ParserBase< ParserTraits >::set_allow_natives_syntax().
|
inline |
Definition at line 603 of file parser.h.
References v8::internal::NULL.
|
inlinestatic |
Definition at line 611 of file parser.h.
References ParserBase< ParserTraits >::allow_lazy(), Parser::Parse(), and ParserBase< Traits >::set_allow_lazy().
Referenced by Parser::Parse(), TEST(), and TestParserSyncWithFlags().
bool Parse | ( | ) |
Definition at line 4673 of file parser.cc.
References ASSERT, ScriptDataImpl::BuildArgs(), ScriptDataImpl::BuildMessage(), v8::internal::CONSUME_CACHED_DATA, v8::internal::DeleteArray(), Vector< T >::length(), ScriptDataImpl::MessageLocation(), v8::internal::NULL, ParserTraits::ReportMessageAt(), and Vector< T >::start().
|
friend |