V8 Project
v8::internal::PreParserStatement Class Reference

#include <preparser.h>

+ Collaboration diagram for v8::internal::PreParserStatement:

Public Member Functions

bool IsStringLiteral ()
 
bool IsUseStrictLiteral ()
 
bool IsFunctionDeclaration ()
 

Static Public Member Functions

static PreParserStatement Default ()
 
static PreParserStatement FunctionDeclaration ()
 
static PreParserStatement ExpressionStatement (PreParserExpression expression)
 

Private Types

enum  Type { kUnknownStatement , kStringLiteralExpressionStatement , kUseStrictExpressionStatement , kFunctionDeclaration }
 

Private Member Functions

 PreParserStatement (Type code)
 

Private Attributes

Type code_
 

Detailed Description

Definition at line 878 of file preparser.h.

Member Enumeration Documentation

◆ Type

Enumerator
kUnknownStatement 
kStringLiteralExpressionStatement 
kUseStrictExpressionStatement 
kFunctionDeclaration 

Definition at line 915 of file preparser.h.

Constructor & Destructor Documentation

◆ PreParserStatement()

v8::internal::PreParserStatement::PreParserStatement ( Type  code)
inlineexplicitprivate

Definition at line 922 of file preparser.h.

922 : code_(code) {}

Referenced by Default(), ExpressionStatement(), and FunctionDeclaration().

+ Here is the caller graph for this function:

Member Function Documentation

◆ Default()

static PreParserStatement v8::internal::PreParserStatement::Default ( )
inlinestatic

◆ ExpressionStatement()

static PreParserStatement v8::internal::PreParserStatement::ExpressionStatement ( PreParserExpression  expression)
inlinestatic

Definition at line 891 of file preparser.h.

892  {
893  if (expression.IsUseStrictLiteral()) {
895  }
896  if (expression.IsStringLiteral()) {
898  }
899  return Default();
900  }
static PreParserStatement Default()
Definition: preparser.h:880

References Default(), v8::internal::PreParserExpression::IsStringLiteral(), v8::internal::PreParserExpression::IsUseStrictLiteral(), kStringLiteralExpressionStatement, kUseStrictExpressionStatement, and PreParserStatement().

Referenced by v8::internal::PreParser::ParseExpressionOrLabelledStatement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FunctionDeclaration()

static PreParserStatement v8::internal::PreParserStatement::FunctionDeclaration ( )
inlinestatic

Definition at line 884 of file preparser.h.

884  {
886  }

References kFunctionDeclaration, and PreParserStatement().

Referenced by v8::internal::PreParser::ParseFunctionDeclaration().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsFunctionDeclaration()

bool v8::internal::PreParserStatement::IsFunctionDeclaration ( )
inline

Definition at line 910 of file preparser.h.

910  {
911  return code_ == kFunctionDeclaration;
912  }

References code_, and kFunctionDeclaration.

◆ IsStringLiteral()

bool v8::internal::PreParserStatement::IsStringLiteral ( )
inline

Definition at line 902 of file preparser.h.

902  {
904  }

References code_, and kStringLiteralExpressionStatement.

Referenced by v8::internal::PreParser::ParseSourceElements().

+ Here is the caller graph for this function:

◆ IsUseStrictLiteral()

bool v8::internal::PreParserStatement::IsUseStrictLiteral ( )
inline

Definition at line 906 of file preparser.h.

906  {
908  }

References code_, and kUseStrictExpressionStatement.

Referenced by v8::internal::PreParser::ParseSourceElements().

+ Here is the caller graph for this function:

Member Data Documentation

◆ code_

Type v8::internal::PreParserStatement::code_
private

Definition at line 923 of file preparser.h.

Referenced by IsFunctionDeclaration(), IsStringLiteral(), and IsUseStrictLiteral().


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