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
PreParser Class Reference

#include <preparser.h>

Inheritance diagram for PreParser:
Collaboration diagram for PreParser:

Public Types

enum  PreParseResult { kPreParseStackOverflow, kPreParseSuccess }
 
typedef PreParserIdentifier Identifier
 
typedef PreParserExpression Expression
 
- Public Types inherited from ParserBase< PreParserTraits >
typedef
PreParserTraits::Type::Expression 
ExpressionT
 
typedef
PreParserTraits::Type::Identifier 
IdentifierT
 

Public Member Functions

 PreParser (Scanner *scanner, ParserRecorder *log, uintptr_t stack_limit)
 
PreParseResult PreParseProgram ()
 
PreParseResult PreParseLazyFunction (StrictMode strict_mode, bool is_generator, ParserRecorder *log)
 
- Public Member Functions inherited from ParserBase< PreParserTraits >
 ParserBase (Scanner *scanner, uintptr_t stack_limit, v8::Extension *extension, ParserRecorder *log, typename PreParserTraits::Type::Zone *zone, typename PreParserTraits::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 PreParserTraits
 PreParserTraits (PreParser *pre_parser)
 
void CheckStrictModeLValue (PreParserExpression expression, bool *ok)
 
bool ShortcutNumericLiteralBinaryExpression (PreParserExpression *x, PreParserExpression y, Token::Value op, int pos, PreParserFactory *factory)
 
PreParserExpression BuildUnaryExpression (PreParserExpression expression, Token::Value op, int pos, PreParserFactory *factory)
 
void ReportMessageAt (Scanner::Location location, const char *message, Vector< const char * > args, bool is_reference_error=false)
 
void ReportMessageAt (Scanner::Location location, const char *type, const char *name_opt, bool is_reference_error=false)
 
void ReportMessageAt (int start_pos, int end_pos, const char *type, const char *name_opt, bool is_reference_error=false)
 
PreParserIdentifier GetSymbol (Scanner *scanner)
 
PreParserExpression ExpressionFromString (int pos, Scanner *scanner, PreParserFactory *factory=NULL)
 
PreParserExpression ParseV8Intrinsic (bool *ok)
 
PreParserExpression ParseFunctionLiteral (PreParserIdentifier name, Scanner::Location function_name_location, bool name_is_strict_reserved, bool is_generator, int function_token_position, FunctionLiteral::FunctionType type, bool *ok)
 

Friends

class PreParserTraits
 

Additional Inherited Members

- Static Public Member Functions inherited from PreParserTraits
template<typename FunctionState >
static void SetUpFunctionState (FunctionState *function_state, void *)
 
template<typename FunctionState >
static void TearDownFunctionState (FunctionState *function_state)
 
static bool IsEvalOrArguments (PreParserIdentifier identifier)
 
static bool IsThisProperty (PreParserExpression expression)
 
static bool IsIdentifier (PreParserExpression expression)
 
static bool IsBoilerplateProperty (PreParserExpression property)
 
static bool IsArrayIndex (PreParserIdentifier string, uint32_t *index)
 
static void PushLiteralName (FuncNameInferrer *fni, PreParserIdentifier id)
 
static void PushPropertyName (FuncNameInferrer *fni, PreParserExpression expression)
 
static void CheckFunctionLiteralInsideTopLevelObjectLiteral (PreParserScope *scope, PreParserExpression value, bool *has_function)
 
static void CheckAssigningFunctionLiteralToProperty (PreParserExpression left, PreParserExpression right)
 
static void CheckPossibleEvalCall (PreParserExpression expression, PreParserScope *scope)
 
static PreParserExpression MarkExpressionAsLValue (PreParserExpression expression)
 
static PreParserIdentifier EmptyIdentifier ()
 
static PreParserExpression EmptyExpression ()
 
static PreParserExpression EmptyLiteral ()
 
static PreParserExpressionList NullExpressionList ()
 
static PreParserExpression GetLiteralTheHole (int position, PreParserFactory *factory)
 
static PreParserIdentifier NextLiteralString (Scanner *scanner, PretenureFlag tenured)
 
static PreParserExpression ThisExpression (PreParserScope *scope, PreParserFactory *factory)
 
static PreParserExpression ExpressionFromLiteral (Token::Value token, int pos, Scanner *scanner, PreParserFactory *factory)
 
static PreParserExpression ExpressionFromIdentifier (PreParserIdentifier name, int pos, PreParserScope *scope, PreParserFactory *factory)
 
static PreParserExpressionList NewExpressionList (int size, void *zone)
 
static PreParserExpressionList NewPropertyList (int size, void *zone)
 
- Protected Types inherited from ParserBase< PreParserTraits >
enum  AllowEvalOrArgumentsAsIdentifier
 
enum  Mode
 
enum  PropertyKind
 
- Protected Member Functions inherited from ParserBase< PreParserTraits >
Scannerscanner () const
 
int position ()
 
int peek_position ()
 
bool stack_overflow () const
 
void set_stack_overflow ()
 
Mode mode () const
 
PreParserTraits::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)
 
PreParserTraits::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)
 
PreParserTraits::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< PreParserTraits >
static int Precedence (Token::Value token, bool accept_IN)
 
- Protected Attributes inherited from ParserBase< PreParserTraits >
bool parenthesized_function_
 
PreParserTraits::Type::Scope * scope_
 
FunctionState * function_state_
 
v8::Extensionextension_
 
FuncNameInferrerfni_
 
ParserRecorderlog_
 
Mode mode_
 

Detailed Description

Definition at line 1003 of file preparser.h.

Member Typedef Documentation

Definition at line 1006 of file preparser.h.

Definition at line 1005 of file preparser.h.

Member Enumeration Documentation

Enumerator
kPreParseStackOverflow 
kPreParseSuccess 

Definition at line 1008 of file preparser.h.

Constructor & Destructor Documentation

PreParser ( Scanner scanner,
ParserRecorder log,
uintptr_t  stack_limit 
)
inline

Definition at line 1013 of file preparser.h.

Member Function Documentation

Friends And Related Function Documentation

friend class PreParserTraits
friend

Definition at line 1049 of file preparser.h.


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