v8  3.25.30(node0.11.13)
V8 is Google's open source JavaScript engine
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Parser Class Reference

#include <parser.h>

Inheritance diagram for Parser:
Collaboration diagram for Parser:

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)
 
ExpressionBuildUnaryExpression (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< StringGetSymbol (Scanner *scanner=NULL)
 
Handle< StringNextLiteralString (Scanner *scanner, PretenureFlag tenured)
 
ExpressionThisExpression (Scope *scope, AstNodeFactory< AstConstructionVisitor > *factory)
 
Literal * ExpressionFromLiteral (Token::Value token, int pos, Scanner *scanner, AstNodeFactory< AstConstructionVisitor > *factory)
 
ExpressionExpressionFromIdentifier (Handle< String > name, int pos, Scope *scope, AstNodeFactory< AstConstructionVisitor > *factory)
 
ExpressionExpressionFromString (int pos, Scanner *scanner, AstNodeFactory< AstConstructionVisitor > *factory)
 
ZoneList
< v8::internal::Expression * > * 
NewExpressionList (int size, Zone *zone)
 
ZoneList
< ObjectLiteral::Property * > * 
NewPropertyList (int size, Zone *zone)
 
ExpressionParseV8Intrinsic (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 ExpressionMarkExpressionAsLValue (Expression *expression)
 
static Handle< StringEmptyIdentifier ()
 
static ExpressionEmptyExpression ()
 
static Literal * EmptyLiteral ()
 
static ZoneList< Expression * > * NullExpressionList ()
 

Friends

class ParserTraits
 

Additional Inherited Members

- Public Types inherited from ParserBase< ParserTraits >
typedef
ParserTraits::Type::Expression 
ExpressionT
 
typedef
ParserTraits::Type::Identifier 
IdentifierT
 
- Protected Types inherited from ParserBase< ParserTraits >
enum  AllowEvalOrArgumentsAsIdentifier
 
enum  Mode
 
enum  PropertyKind
 
- Protected Member Functions inherited from ParserBase< ParserTraits >
Scannerscanner () const
 
int position ()
 
int peek_position ()
 
bool stack_overflow () const
 
void set_stack_overflow ()
 
Mode mode () const
 
ParserTraits::Type::Zone * zone () const
 
 INLINE (Token::Value peek())
 
 INLINE (Token::Value Next())
 
void Consume (Token::Value token)
 
bool Check (Token::Value token)
 
void Expect (Token::Value token, bool *ok)
 
void ExpectSemicolon (bool *ok)
 
bool peek_any_identifier ()
 
bool CheckContextualKeyword (Vector< const char > keyword)
 
void ExpectContextualKeyword (Vector< const char > keyword, bool *ok)
 
void CheckOctalLiteral (int beg_pos, int end_pos, bool *ok)
 
ParserTraits::Type::Factory * factory ()
 
StrictMode strict_mode ()
 
bool is_generator () const
 
void ReportMessage (const char *message, Vector< const char * > args, bool is_reference_error=false)
 
void ReportMessageAt (Scanner::Location location, const char *message, bool is_reference_error=false)
 
void ReportUnexpectedToken (Token::Value token)
 
IdentifierT ParseIdentifier (AllowEvalOrArgumentsAsIdentifier, bool *ok)
 
IdentifierT ParseIdentifierOrStrictReservedWord (bool *is_strict_reserved, bool *ok)
 
IdentifierT ParseIdentifierName (bool *ok)
 
IdentifierT ParseIdentifierNameOrGetOrSet (bool *is_get, bool *is_set, bool *ok)
 
ExpressionT ParseRegExpLiteral (bool seen_equal, bool *ok)
 
ExpressionT ParsePrimaryExpression (bool *ok)
 
ExpressionT ParseExpression (bool accept_IN, bool *ok)
 
ExpressionT ParseArrayLiteral (bool *ok)
 
ExpressionT ParseObjectLiteral (bool *ok)
 
ParserTraits::Type::ExpressionList ParseArguments (bool *ok)
 
ExpressionT ParseAssignmentExpression (bool accept_IN, bool *ok)
 
ExpressionT ParseYieldExpression (bool *ok)
 
ExpressionT ParseConditionalExpression (bool accept_IN, bool *ok)
 
ExpressionT ParseBinaryExpression (int prec, bool accept_IN, bool *ok)
 
ExpressionT ParseUnaryExpression (bool *ok)
 
ExpressionT ParsePostfixExpression (bool *ok)
 
ExpressionT ParseLeftHandSideExpression (bool *ok)
 
ExpressionT ParseMemberWithNewPrefixesExpression (bool *ok)
 
ExpressionT ParseMemberExpression (bool *ok)
 
ExpressionT ParseMemberExpressionContinuation (ExpressionT expression, bool *ok)
 
- Static Protected Member Functions inherited from ParserBase< ParserTraits >
static int Precedence (Token::Value token, bool accept_IN)
 
- Protected Attributes inherited from ParserBase< ParserTraits >
bool parenthesized_function_
 
ParserTraits::Type::Scope * scope_
 
FunctionState * function_state_
 
v8::Extensionextension_
 
FuncNameInferrerfni_
 
ParserRecorderlog_
 
Mode mode_
 

Detailed Description

Definition at line 600 of file parser.h.

Constructor & Destructor Documentation

~Parser ( )
inline

Definition at line 603 of file parser.h.

References v8::internal::NULL.

Member Function Documentation

static bool Parse ( CompilationInfo info,
bool  allow_lazy = false 
)
inlinestatic

Friends And Related Function Documentation

friend class ParserTraits
friend

Definition at line 620 of file parser.h.


The documentation for this class was generated from the following files: