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

#include <scanner.h>

Data Structures

class  LiteralScope
 
struct  Location
 

Public Member Functions

 Scanner (UnicodeCache *scanner_contants)
 
void Initialize (Utf16CharacterStream *source)
 
Token::Value Next ()
 
Token::Value current_token ()
 
Location location () const
 
Token::Value peek () const
 
Location peek_location () const
 
bool literal_contains_escapes () const
 
bool is_literal_contextual_keyword (Vector< const char > keyword)
 
bool is_next_contextual_keyword (Vector< const char > keyword)
 
Handle< StringAllocateNextLiteralString (Isolate *isolate, PretenureFlag tenured)
 
Handle< StringAllocateInternalizedString (Isolate *isolate)
 
double DoubleValue ()
 
bool UnescapedLiteralMatches (const char *data, int length)
 
void IsGetOrSet (bool *is_get, bool *is_set)
 
int FindNumber (DuplicateFinder *finder, int value)
 
int FindSymbol (DuplicateFinder *finder, int value)
 
void LogSymbol (ParserRecorder *log, int position)
 
UnicodeCacheunicode_cache ()
 
Location octal_position () const
 
void clear_octal_position ()
 
void SeekForward (int pos)
 
bool HarmonyScoping () const
 
void SetHarmonyScoping (bool scoping)
 
bool HarmonyModules () const
 
void SetHarmonyModules (bool modules)
 
bool HarmonyNumericLiterals () const
 
void SetHarmonyNumericLiterals (bool numeric_literals)
 
bool HasAnyLineTerminatorBeforeNext () const
 
bool ScanRegExpPattern (bool seen_equal)
 
bool ScanRegExpFlags ()
 

Static Public Attributes

static const int kNoOctalLocation = -1
 

Detailed Description

Definition at line 324 of file scanner.h.

Constructor & Destructor Documentation

Scanner ( UnicodeCache scanner_contants)
explicit

Definition at line 47 of file scanner.cc.

Member Function Documentation

Handle< String > AllocateInternalizedString ( Isolate isolate)
Handle< String > AllocateNextLiteralString ( Isolate isolate,
PretenureFlag  tenured 
)
void clear_octal_position ( )
inline

Definition at line 437 of file scanner.h.

References Scanner::Location::invalid().

Referenced by ParserBase< ParserTraits >::CheckOctalLiteral().

Token::Value current_token ( )
inline

Definition at line 372 of file scanner.h.

Referenced by PreParserTraits::GetSymbol().

int FindNumber ( DuplicateFinder finder,
int  value 
)
int FindSymbol ( DuplicateFinder finder,
int  value 
)
bool HarmonyModules ( ) const
inline

Definition at line 451 of file scanner.h.

Referenced by ParserBase< ParserTraits >::allow_modules().

bool HarmonyNumericLiterals ( ) const
inline
bool HarmonyScoping ( ) const
inline

Definition at line 445 of file scanner.h.

Referenced by ParserBase< ParserTraits >::allow_harmony_scoping().

bool HasAnyLineTerminatorBeforeNext ( ) const
inline

Definition at line 466 of file scanner.h.

void Initialize ( Utf16CharacterStream source)

Definition at line 55 of file scanner.cc.

Referenced by TEST(), TestScanRegExp(), and TestStreamScanner().

bool is_literal_contextual_keyword ( Vector< const char >  keyword)
inline

Definition at line 393 of file scanner.h.

References ASSERT_NOT_NULL.

bool is_next_contextual_keyword ( Vector< const char >  keyword)
inline

Definition at line 397 of file scanner.h.

References ASSERT_NOT_NULL.

void IsGetOrSet ( bool *  is_get,
bool *  is_set 
)
inline

Definition at line 417 of file scanner.h.

References Scanner::literal_contains_escapes(), and Vector< T >::start().

bool literal_contains_escapes ( ) const
inline
void LogSymbol ( ParserRecorder log,
int  position 
)
Location octal_position ( ) const
inline

Definition at line 436 of file scanner.h.

Referenced by ParserBase< ParserTraits >::CheckOctalLiteral().

Token::Value peek ( ) const
inline

Definition at line 380 of file scanner.h.

Referenced by ParserBase< ParserTraits >::INLINE(), and TestScanRegExp().

Location peek_location ( ) const
inline
bool ScanRegExpFlags ( )
bool ScanRegExpPattern ( bool  seen_equal)

Definition at line 1022 of file scanner.cc.

References Scanner::LiteralScope::Complete(), and UnicodeCache::IsLineTerminator().

Referenced by TestScanRegExp().

void SeekForward ( int  pos)
void SetHarmonyModules ( bool  modules)
inline

Definition at line 454 of file scanner.h.

References v8::internal::modules().

Referenced by ParserBase< ParserTraits >::set_allow_modules(), and TEST().

void SetHarmonyNumericLiterals ( bool  numeric_literals)
inline
void SetHarmonyScoping ( bool  scoping)
inline

Definition at line 448 of file scanner.h.

Referenced by ParserBase< ParserTraits >::set_allow_harmony_scoping(), and TEST().

bool UnescapedLiteralMatches ( const char *  data,
int  length 
)
inline
UnicodeCache* unicode_cache ( )
inline

Definition at line 433 of file scanner.h.

Field Documentation

const int kNoOctalLocation = -1
static

Definition at line 363 of file scanner.h.


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