V8 Project
v8::internal::DateParser::DateToken Struct Reference
+ Collaboration diagram for v8::internal::DateParser::DateToken:

Public Member Functions

bool IsInvalid ()
 
bool IsUnknown ()
 
bool IsNumber ()
 
bool IsSymbol ()
 
bool IsWhiteSpace ()
 
bool IsEndOfInput ()
 
bool IsKeyword ()
 
int length ()
 
int number ()
 
KeywordType keyword_type ()
 
int keyword_value ()
 
char symbol ()
 
bool IsSymbol (char symbol)
 
bool IsKeywordType (KeywordType tag)
 
bool IsFixedLengthNumber (int length)
 
bool IsAsciiSign ()
 
int ascii_sign ()
 
bool IsKeywordZ ()
 
bool IsUnknown (int character)
 

Static Public Member Functions

static DateToken Keyword (KeywordType tag, int value, int length)
 
static DateToken Number (int value, int length)
 
static DateToken Symbol (char symbol)
 
static DateToken EndOfInput ()
 
static DateToken WhiteSpace (int length)
 
static DateToken Unknown ()
 
static DateToken Invalid ()
 

Private Types

enum  TagType {
  kInvalidTokenTag = -6 , kUnknownTokenTag = -5 , kWhiteSpaceTag = -4 , kNumberTag = -3 ,
  kSymbolTag = -2 , kEndOfInputTag = -1 , kKeywordTagStart = 0
}
 

Private Member Functions

 DateToken (int tag, int length, int value)
 

Private Attributes

int tag_
 
int length_
 
int value_
 

Detailed Description

Definition at line 141 of file dateparser.h.

Member Enumeration Documentation

◆ TagType

Enumerator
kInvalidTokenTag 
kUnknownTokenTag 
kWhiteSpaceTag 
kNumberTag 
kSymbolTag 
kEndOfInputTag 
kKeywordTagStart 

Definition at line 215 of file dateparser.h.

Constructor & Destructor Documentation

◆ DateToken()

v8::internal::DateParser::DateToken::DateToken ( int  tag,
int  length,
int  value 
)
inlineprivate

Definition at line 224 of file dateparser.h.

Referenced by EndOfInput(), Invalid(), Keyword(), Number(), Symbol(), Unknown(), and WhiteSpace().

+ Here is the caller graph for this function:

Member Function Documentation

◆ ascii_sign()

int v8::internal::DateParser::DateToken::ascii_sign ( )
inline

Definition at line 181 of file dateparser.h.

181  {
182  DCHECK(IsAsciiSign());
183  return 44 - value_;
184  }
#define DCHECK(condition)
Definition: logging.h:205

References DCHECK, IsAsciiSign(), and value_.

Referenced by v8::internal::DateParser::ParseES5DateTime().

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

◆ EndOfInput()

static DateToken v8::internal::DateParser::DateToken::EndOfInput ( )
inlinestatic

Definition at line 201 of file dateparser.h.

201  {
202  return DateToken(kEndOfInputTag, 0, -1);
203  }
DateToken(int tag, int length, int value)
Definition: dateparser.h:224

References DateToken(), and kEndOfInputTag.

Referenced by v8::internal::DateParser::ParseES5DateTime().

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

◆ Invalid()

static DateToken v8::internal::DateParser::DateToken::Invalid ( )
inlinestatic

Definition at line 210 of file dateparser.h.

210  {
211  return DateToken(kInvalidTokenTag, 0, -1);
212  }

References DateToken(), and kInvalidTokenTag.

Referenced by v8::internal::DateParser::ParseES5DateTime().

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

◆ IsAsciiSign()

bool v8::internal::DateParser::DateToken::IsAsciiSign ( )
inline

Definition at line 178 of file dateparser.h.

178  {
179  return tag_ == kSymbolTag && (value_ == '-' || value_ == '+');
180  }

References kSymbolTag, tag_, and value_.

Referenced by ascii_sign(), v8::internal::DateParser::Parse(), and v8::internal::DateParser::ParseES5DateTime().

+ Here is the caller graph for this function:

◆ IsEndOfInput()

bool v8::internal::DateParser::DateToken::IsEndOfInput ( )
inline

Definition at line 148 of file dateparser.h.

148 { return tag_ == kEndOfInputTag; }

References kEndOfInputTag, and tag_.

Referenced by v8::internal::DateParser::Parse(), and v8::internal::DateParser::ParseES5DateTime().

+ Here is the caller graph for this function:

◆ IsFixedLengthNumber()

bool v8::internal::DateParser::DateToken::IsFixedLengthNumber ( int  length)
inline

Definition at line 175 of file dateparser.h.

175  {
176  return IsNumber() && length_ == length;
177  }

References IsNumber(), length(), and length_.

Referenced by v8::internal::DateParser::ParseES5DateTime().

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

◆ IsInvalid()

bool v8::internal::DateParser::DateToken::IsInvalid ( )
inline

Definition at line 143 of file dateparser.h.

143 { return tag_ == kInvalidTokenTag; }

References kInvalidTokenTag, and tag_.

Referenced by v8::internal::DateParser::Parse().

+ Here is the caller graph for this function:

◆ IsKeyword()

bool v8::internal::DateParser::DateToken::IsKeyword ( )
inline

Definition at line 149 of file dateparser.h.

149 { return tag_ >= kKeywordTagStart; }

References kKeywordTagStart, and tag_.

Referenced by keyword_type(), and keyword_value().

+ Here is the caller graph for this function:

◆ IsKeywordType()

bool v8::internal::DateParser::DateToken::IsKeywordType ( KeywordType  tag)
inline

Definition at line 172 of file dateparser.h.

172  {
173  return tag_ == tag;
174  }

References tag_.

Referenced by IsKeywordZ(), and v8::internal::DateParser::ParseES5DateTime().

+ Here is the caller graph for this function:

◆ IsKeywordZ()

bool v8::internal::DateParser::DateToken::IsKeywordZ ( )
inline

Definition at line 185 of file dateparser.h.

185  {
186  return IsKeywordType(TIME_ZONE_NAME) && length_ == 1 && value_ == 0;
187  }
bool IsKeywordType(KeywordType tag)
Definition: dateparser.h:172

References IsKeywordType(), length_, v8::internal::DateParser::TIME_ZONE_NAME, and value_.

Referenced by v8::internal::DateParser::Parse(), and v8::internal::DateParser::ParseES5DateTime().

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

◆ IsNumber()

bool v8::internal::DateParser::DateToken::IsNumber ( )
inline

Definition at line 145 of file dateparser.h.

145 { return tag_ == kNumberTag; }

References kNumberTag, and tag_.

Referenced by IsFixedLengthNumber(), number(), v8::internal::DateParser::Parse(), and v8::internal::DateParser::ParseES5DateTime().

+ Here is the caller graph for this function:

◆ IsSymbol() [1/2]

bool v8::internal::DateParser::DateToken::IsSymbol ( )
inline

Definition at line 146 of file dateparser.h.

146 { return tag_ == kSymbolTag; }

References kSymbolTag, and tag_.

Referenced by IsSymbol(), v8::internal::DateParser::Parse(), v8::internal::DateParser::ParseES5DateTime(), v8::internal::DateParser::DateStringTokenizer< Char >::SkipSymbol(), and symbol().

+ Here is the caller graph for this function:

◆ IsSymbol() [2/2]

bool v8::internal::DateParser::DateToken::IsSymbol ( char  symbol)
inline

Definition at line 169 of file dateparser.h.

169  {
170  return IsSymbol() && this->symbol() == symbol;
171  }

References IsSymbol(), and symbol().

+ Here is the call graph for this function:

◆ IsUnknown() [1/2]

bool v8::internal::DateParser::DateToken::IsUnknown ( )
inline

Definition at line 144 of file dateparser.h.

144 { return tag_ == kUnknownTokenTag; }

References kUnknownTokenTag, and tag_.

Referenced by IsUnknown().

+ Here is the caller graph for this function:

◆ IsUnknown() [2/2]

bool v8::internal::DateParser::DateToken::IsUnknown ( int  character)
inline

Definition at line 188 of file dateparser.h.

188  {
189  return IsUnknown() && value_ == character;
190  }

References IsUnknown(), and value_.

+ Here is the call graph for this function:

◆ IsWhiteSpace()

bool v8::internal::DateParser::DateToken::IsWhiteSpace ( )
inline

Definition at line 147 of file dateparser.h.

147 { return tag_ == kWhiteSpaceTag; }

References kWhiteSpaceTag, and tag_.

Referenced by v8::internal::DateParser::Parse().

+ Here is the caller graph for this function:

◆ Keyword()

static DateToken v8::internal::DateParser::DateToken::Keyword ( KeywordType  tag,
int  value,
int  length 
)
inlinestatic

Definition at line 192 of file dateparser.h.

192  {
193  return DateToken(tag, length, value);
194  }

References DateToken(), and length().

+ Here is the call graph for this function:

◆ keyword_type()

KeywordType v8::internal::DateParser::DateToken::keyword_type ( )
inline

Definition at line 157 of file dateparser.h.

157  {
158  DCHECK(IsKeyword());
159  return static_cast<KeywordType>(tag_);
160  }

References DCHECK, IsKeyword(), and tag_.

+ Here is the call graph for this function:

◆ keyword_value()

int v8::internal::DateParser::DateToken::keyword_value ( )
inline

Definition at line 161 of file dateparser.h.

161  {
162  DCHECK(IsKeyword());
163  return value_;
164  }

References DCHECK, IsKeyword(), and value_.

+ Here is the call graph for this function:

◆ length()

int v8::internal::DateParser::DateToken::length ( )
inline

Definition at line 151 of file dateparser.h.

151 { return length_; }

References length_.

Referenced by IsFixedLengthNumber(), Keyword(), Number(), v8::internal::DateParser::ReadMilliseconds(), and WhiteSpace().

+ Here is the caller graph for this function:

◆ number()

int v8::internal::DateParser::DateToken::number ( )
inline

Definition at line 153 of file dateparser.h.

153  {
154  DCHECK(IsNumber());
155  return value_;
156  }

References DCHECK, IsNumber(), and value_.

Referenced by v8::internal::DateParser::Parse(), v8::internal::DateParser::ParseES5DateTime(), and v8::internal::DateParser::ReadMilliseconds().

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

◆ Number()

static DateToken v8::internal::DateParser::DateToken::Number ( int  value,
int  length 
)
inlinestatic

Definition at line 195 of file dateparser.h.

195  {
196  return DateToken(kNumberTag, length, value);
197  }

References DateToken(), kNumberTag, and length().

+ Here is the call graph for this function:

◆ symbol()

char v8::internal::DateParser::DateToken::symbol ( )
inline

Definition at line 165 of file dateparser.h.

165  {
166  DCHECK(IsSymbol());
167  return static_cast<char>(value_);
168  }

References DCHECK, IsSymbol(), and value_.

Referenced by IsSymbol(), v8::internal::DateParser::ParseES5DateTime(), and Symbol().

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

◆ Symbol()

static DateToken v8::internal::DateParser::DateToken::Symbol ( char  symbol)
inlinestatic

Definition at line 198 of file dateparser.h.

198  {
199  return DateToken(kSymbolTag, 1, symbol);
200  }

References DateToken(), kSymbolTag, and symbol().

+ Here is the call graph for this function:

◆ Unknown()

static DateToken v8::internal::DateParser::DateToken::Unknown ( )
inlinestatic

Definition at line 207 of file dateparser.h.

207  {
208  return DateToken(kUnknownTokenTag, 1, -1);
209  }

References DateToken(), and kUnknownTokenTag.

+ Here is the call graph for this function:

◆ WhiteSpace()

static DateToken v8::internal::DateParser::DateToken::WhiteSpace ( int  length)
inlinestatic

Definition at line 204 of file dateparser.h.

204  {
205  return DateToken(kWhiteSpaceTag, length, -1);
206  }

References DateToken(), kWhiteSpaceTag, and length().

+ Here is the call graph for this function:

Member Data Documentation

◆ length_

int v8::internal::DateParser::DateToken::length_
private

Definition at line 230 of file dateparser.h.

Referenced by IsFixedLengthNumber(), IsKeywordZ(), and length().

◆ tag_

int v8::internal::DateParser::DateToken::tag_
private

◆ value_

int v8::internal::DateParser::DateToken::value_
private

Definition at line 231 of file dateparser.h.

Referenced by ascii_sign(), IsAsciiSign(), IsKeywordZ(), IsUnknown(), keyword_value(), number(), and symbol().


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