CsLiteral Struct Reference

Literal expression AST node. More...

Inheritance diagram for CsLiteral:
CsPrimaryExpression CsExpression CsNode

List of all members.

Public Member Functions

 CsLiteral ()
 CsLiteral (LineInfo line_info)
virtual ~CsLiteral ()
virtual void type_lookup (CsDisplay &display)
 Type Lookup - pass 3 (for internal purpose only).
virtual void member_lookup (CsDisplay &display)
 Member Lookup - pass 4 (for internal purpose only).
bool eval_constant_expression (constant_expression_check_context context, constant_expression_data &data, CsDisplay &display)
virtual void visit (CsAstVisitor *visitor)
 CsAstVisitor support.
virtual void callback (CsAstCallback *visitor)
 CsAstCallback support.
virtual void addTokensRecursive (CsTokenCollector &tokenCollector)
 Recursively collect token indexes in source code order.
virtual void addTokens (CsTokenCollector &tokenCollector)
 Collect token indexes associated with this AST node.

Public Attributes

CsTokenType type
 Literal token type (one of: tkTRUE, tkFALSE, tkNULL or tkLITERAL).
PHashString literal
 Literal string representation (for literal only).
CsLiteralType literal_type
 Literal type (for literals only).
unsigned __int64 int_value
 Integer value.
double double_value
 Float value.
PHashString string_value
 String value.
PHashString original_text
CsTokenIndex literal_token

Detailed Description

Literal expression AST node.

EBNF grammar:

literal:
  "true"
  "false"
  "null"
  literal-token


Constructor & Destructor Documentation

CsLiteral::CsLiteral (  )  [inline]
CsLiteral::CsLiteral ( LineInfo  line_info  )  [inline, explicit]
virtual CsLiteral::~CsLiteral (  )  [virtual]

Member Function Documentation

virtual void CsLiteral::addTokens ( CsTokenCollector tokenCollector  )  [virtual]

Collect token indexes associated with this AST node.

Implements CsNode.

virtual void CsLiteral::addTokensRecursive ( CsTokenCollector tokenCollector  )  [virtual]

Recursively collect token indexes in source code order.

Implements CsNode.

virtual void CsLiteral::callback ( CsAstCallback visitor  )  [inline, virtual]

CsAstCallback support.

Implements CsNode.

bool CsLiteral::eval_constant_expression ( constant_expression_check_context  context,
constant_expression_data data,
CsDisplay &  display 
)
virtual void CsLiteral::member_lookup ( CsDisplay &  display  )  [virtual]

Member Lookup - pass 4 (for internal purpose only).

Implements CsNode.

virtual void CsLiteral::type_lookup ( CsDisplay &  display  )  [inline, virtual]

Type Lookup - pass 3 (for internal purpose only).

Reimplemented from CsExpression.

virtual void CsLiteral::visit ( CsAstVisitor visitor  )  [inline, virtual]

CsAstVisitor support.

Implements CsNode.


Member Data Documentation

Float value.

unsigned __int64 CsLiteral::int_value

Integer value.

PHashString CsLiteral::literal

Literal string representation (for literal only).

CsLiteralType CsLiteral::literal_type

Literal type (for literals only).

String value.

CsTokenType CsLiteral::type

Literal token type (one of: tkTRUE, tkFALSE, tkNULL or tkLITERAL).

© 2010 metaspec