Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
Irony.Parsing.Token Class Reference

Tokens are produced by scanner and fed to parser, optionally passing through Token filters in between. More...

Inheritance diagram for Irony.Parsing.Token:
Irony.Parsing.MultiToken

Public Member Functions

 Token (Terminal term, SourceLocation location, string text, object value)
 Initializes a new instance of the Token class. More...
 
 Token (Terminal term, SourceLocation location, int length, string source, object value)
 Initializes a new instance of the Token class. More...
 
void SetTerminal (Terminal terminal)
 Sets the terminal. More...
 
bool IsSet (TokenFlags flag)
 Determines whether the specified flag is set. More...
 
bool IsError ()
 Determines whether this instance is error. More...
 
override string ToString ()
 

Static Public Member Functions

static void LinkMatchingBraces (Token openingBrace, Token closingBrace)
 Links the matching braces. More...
 

Public Attributes

readonly SourceLocation Location
 Location in the source code. More...
 
object Value
 Get the Value associated with this token. More...
 
TokenFlags Flags
 Get the flags More...
 
TokenEditorInfo EditorInfo
 Gets the Editor info. More...
 
short ScannerState
 Scanner state after producing token More...
 

Properties

Terminal Terminal [get, set]
 Gets the terminal. More...
 
KeyTerm KeyTerm [get, set]
 Gets the Key terminal if any. More...
 
int Length [get, set]
 Gets the length. More...
 
string SourceCode [get, set]
 Gets the source code. More...
 
string Text [get]
 Gets the text associated with this token. More...
 
string ValueString [get]
 Gets the value as a string. More...
 
TokenCategory Category [get]
 Gets the category. More...
 
Token OtherBrace [get, set]
 Gets the matching opening/closing brace More...
 

Detailed Description

Tokens are produced by scanner and fed to parser, optionally passing through Token filters in between.

Definition at line 74 of file Token.cs.

Constructor & Destructor Documentation

Irony.Parsing.Token.Token ( Terminal  term,
SourceLocation  location,
string  text,
object  value 
)

Initializes a new instance of the Token class.

Parameters
termThe term.
locationThe location.
textThe text.
valueThe value.

Definition at line 85 of file Token.cs.

Irony.Parsing.Token.Token ( Terminal  term,
SourceLocation  location,
int  length,
string  source,
object  value 
)

Initializes a new instance of the Token class.

Parameters
termThe term.
locationThe location.
lengthThe length.
sourceThe source.
valueThe value.

Definition at line 103 of file Token.cs.

Member Function Documentation

bool Irony.Parsing.Token.IsError ( )

Determines whether this instance is error.

Returns
true if this instance is error; otherwise, false.

Definition at line 235 of file Token.cs.

bool Irony.Parsing.Token.IsSet ( TokenFlags  flag)

Determines whether the specified flag is set.

Parameters
flagThe flag.
Returns
true if the specified flag is set; otherwise, false.

Definition at line 223 of file Token.cs.

static void Irony.Parsing.Token.LinkMatchingBraces ( Token  openingBrace,
Token  closingBrace 
)
static

Links the matching braces.

Parameters
openingBraceThe opening brace.
closingBraceThe closing brace.

Definition at line 245 of file Token.cs.

void Irony.Parsing.Token.SetTerminal ( Terminal  terminal)

Sets the terminal.

Parameters
terminalThe terminal.

Definition at line 208 of file Token.cs.

override string Irony.Parsing.Token.ToString ( )

Definition at line 253 of file Token.cs.

Member Data Documentation

TokenEditorInfo Irony.Parsing.Token.EditorInfo

Gets the Editor info.

Definition at line 180 of file Token.cs.

TokenFlags Irony.Parsing.Token.Flags

Get the flags

Definition at line 175 of file Token.cs.

readonly SourceLocation Irony.Parsing.Token.Location
short Irony.Parsing.Token.ScannerState

Scanner state after producing token

Definition at line 202 of file Token.cs.

object Irony.Parsing.Token.Value

Get the Value associated with this token.

Definition at line 159 of file Token.cs.

Property Documentation

TokenCategory Irony.Parsing.Token.Category
get

Gets the category.

Definition at line 186 of file Token.cs.

KeyTerm Irony.Parsing.Token.KeyTerm
getset

Gets the Key terminal if any.

Definition at line 126 of file Token.cs.

int Irony.Parsing.Token.Length
getset

Gets the length.

Definition at line 131 of file Token.cs.

Referenced by Irony.Parsing.ParseTreeNode.ParseTreeNode().

Token Irony.Parsing.Token.OtherBrace
getset

Gets the matching opening/closing brace

Definition at line 194 of file Token.cs.

string Irony.Parsing.Token.SourceCode
getset

Gets the source code.

The source code.

Definition at line 139 of file Token.cs.

Terminal Irony.Parsing.Token.Terminal
getset
string Irony.Parsing.Token.Text
get
string Irony.Parsing.Token.ValueString
get

Gets the value as a string.

Definition at line 165 of file Token.cs.

Referenced by Irony.Parsing.Terminal.TokenToString().


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