v8  3.14.5(node0.10.28)
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 Types

typedef
unibrow::Utf8InputBuffer< 1024 > 
Utf8Decoder
 

Public Member Functions

 Scanner (UnicodeCache *scanner_contants)
 
void Initialize (Utf16CharacterStream *source)
 
Token::Value Next ()
 
Token::Value current_token ()
 
Location location () const
 
Vector< const char > literal_ascii_string ()
 
Vector< const uc16literal_utf16_string ()
 
bool is_literal_ascii ()
 
int literal_length () const
 
bool literal_contains_escapes () const
 
Token::Value peek () const
 
Location peek_location () const
 
Vector< const char > next_literal_ascii_string ()
 
Vector< const uc16next_literal_utf16_string ()
 
bool is_next_literal_ascii ()
 
int next_literal_length () const
 
UnicodeCacheunicode_cache ()
 
uc32 ScanOctalEscape (uc32 c, int length)
 
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 HasAnyLineTerminatorBeforeNext () const
 
bool ScanRegExpPattern (bool seen_equal)
 
bool ScanRegExpFlags ()
 

Static Public Member Functions

static bool IsIdentifier (unibrow::CharacterStream *buffer)
 

Static Public Attributes

static const int kNoOctalLocation = -1
 
static const int kCharacterLookaheadBufferSize = 1
 

Detailed Description

Definition at line 277 of file scanner.h.

Member Typedef Documentation

Definition at line 318 of file scanner.h.

Constructor & Destructor Documentation

Scanner ( UnicodeCache scanner_contants)
explicit

Definition at line 41 of file scanner.cc.

Member Function Documentation

void clear_octal_position ( )
inline

Definition at line 399 of file scanner.h.

References Scanner::Location::invalid().

Token::Value current_token ( )
inline

Definition at line 327 of file scanner.h.

Referenced by PreParser::PreParseLazyFunction().

bool HarmonyModules ( ) const
inline

Definition at line 413 of file scanner.h.

bool HarmonyScoping ( ) const
inline

Definition at line 407 of file scanner.h.

bool HasAnyLineTerminatorBeforeNext ( ) const
inline

Definition at line 423 of file scanner.h.

void Initialize ( Utf16CharacterStream source)
bool is_literal_ascii ( )
inline

Definition at line 345 of file scanner.h.

References ASSERT_NOT_NULL.

Referenced by TestScanRegExp().

bool is_next_literal_ascii ( )
inline

Definition at line 381 of file scanner.h.

References ASSERT_NOT_NULL.

static bool IsIdentifier ( unibrow::CharacterStream buffer)
static
Vector<const char> literal_ascii_string ( )
inline

Definition at line 337 of file scanner.h.

References ASSERT_NOT_NULL.

Referenced by TestScanRegExp().

bool literal_contains_escapes ( ) const
inline
int literal_length ( ) const
inline

Definition at line 349 of file scanner.h.

References ASSERT_NOT_NULL.

Vector<const uc16> literal_utf16_string ( )
inline

Definition at line 341 of file scanner.h.

References ASSERT_NOT_NULL.

Location location ( ) const
inline
Token::Value Next ( )

Definition at line 224 of file scanner.cc.

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

Vector<const char> next_literal_ascii_string ( )
inline

Definition at line 373 of file scanner.h.

References ASSERT_NOT_NULL.

int next_literal_length ( ) const
inline

Definition at line 385 of file scanner.h.

References ASSERT_NOT_NULL.

Vector<const uc16> next_literal_utf16_string ( )
inline

Definition at line 377 of file scanner.h.

References ASSERT_NOT_NULL.

Location octal_position ( ) const
inline

Definition at line 398 of file scanner.h.

Token::Value peek ( ) const
inline

Definition at line 367 of file scanner.h.

Referenced by PreParser::PreParseLazyFunction(), and TestScanRegExp().

Location peek_location ( ) const
inline

Definition at line 369 of file scanner.h.

Referenced by PreParser::PreParseLazyFunction().

uc32 ScanOctalEscape ( uc32  c,
int  length 
)

Definition at line 667 of file scanner.cc.

bool ScanRegExpFlags ( )
bool ScanRegExpPattern ( bool  seen_equal)

Definition at line 993 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 416 of file scanner.h.

References v8::internal::modules().

Referenced by Parser::Parser(), and TEST().

void SetHarmonyScoping ( bool  scoping)
inline

Definition at line 410 of file scanner.h.

Referenced by Parser::Parser(), TEST(), and TestParserSync().

UnicodeCache* unicode_cache ( )
inline

Definition at line 390 of file scanner.h.

Field Documentation

const int kCharacterLookaheadBufferSize = 1
static

Definition at line 392 of file scanner.h.

const int kNoOctalLocation = -1
static

Definition at line 316 of file scanner.h.


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