ScriptStack 1.0.0
A .NET scripting language
Lade ...
Suche ...
Keine Treffer
ScriptStack.Compiler.Token Klassenreferenz

A lexical token or simply token is a string with an assigned and thus identified meaning. Mehr ...

Öffentliche Methoden

 Token (TokenType tokenType, object lexeme, int line, int column, String sourceLine)
 
override string ToString ()
 

Propertys

TokenType Type [get]
 
object Lexeme [get]
 
int Line [get]
 
int Column [get]
 
string Text [get]
 

Private Attribute

TokenType tokenType
 
object lexeme
 
int line
 
int column
 
String text
 

Ausführliche Beschreibung

A lexical token or simply token is a string with an assigned and thus identified meaning.

Beschreibung der Konstruktoren und Destruktoren

◆ Token()

ScriptStack.Compiler.Token.Token ( TokenType tokenType,
object lexeme,
int line,
int column,
String sourceLine )
105 {
106 this.tokenType = tokenType;
107 this.lexeme = lexeme;
108 this.line = line;
109 this.column = Math.Max(0, column - lexeme.ToString().Length - 1);
110 this.text = sourceLine;
111 }
int column
Definition Token.cs:97
TokenType tokenType
Definition Token.cs:94
int line
Definition Token.cs:96
object lexeme
Definition Token.cs:95

Benutzt ScriptStack.Compiler.Token.column, ScriptStack.Compiler.Token.lexeme, ScriptStack.Compiler.Token.line und ScriptStack.Compiler.Token.tokenType.

Dokumentation der Elementfunktionen

◆ ToString()

override string ScriptStack.Compiler.Token.ToString ( )
114 {
115 return "Token(" + tokenType + ", \"" + lexeme.ToString() + "\")";
116 }

Benutzt ScriptStack.Compiler.Token.lexeme und ScriptStack.Compiler.Token.tokenType.

Dokumentation der Datenelemente

◆ column

int ScriptStack.Compiler.Token.column
private

◆ lexeme

object ScriptStack.Compiler.Token.lexeme
private

◆ line

int ScriptStack.Compiler.Token.line
private

◆ text

String ScriptStack.Compiler.Token.text
private

◆ tokenType

TokenType ScriptStack.Compiler.Token.tokenType
private

Dokumentation der Propertys

◆ Column

int ScriptStack.Compiler.Token.Column
get
138 {
139 get { return column; }
140 }

◆ Lexeme

◆ Line

int ScriptStack.Compiler.Token.Line
get
133 {
134 get { return line; }
135 }

Wird benutzt von ScriptStack.Compiler.Parser.InsertDebugInfo().

◆ Text

string ScriptStack.Compiler.Token.Text
get
143 {
144 get { return text; }
145 }
String text
Definition Token.cs:98

Wird benutzt von ScriptStack.Compiler.Parser.InsertDebugInfo().

◆ Type

TokenType ScriptStack.Compiler.Token.Type
get
123 {
124 get { return tokenType; }
125 }

Wird benutzt von ScriptStack.Compiler.Parser.And(), ScriptStack.Compiler.Parser.Arithmetic(), ScriptStack.Compiler.Parser.ArrayAssignment(), ScriptStack.Compiler.Parser.Assignment(), ScriptStack.Compiler.Parser.Atom(), ScriptStack.Compiler.Parser.BinaryAnd(), ScriptStack.Compiler.Parser.BinaryNot(), ScriptStack.Compiler.Parser.BinaryNotAssign(), ScriptStack.Compiler.Parser.BinaryOr(), ScriptStack.Compiler.Parser.BraceArray(), ScriptStack.Compiler.Parser.BracketArray(), ScriptStack.Compiler.Parser.Break(), ScriptStack.Compiler.Parser.Continue(), ScriptStack.Compiler.Parser.EnumDeclaration(), ScriptStack.Compiler.Parser.ExpectIdentifier(), ScriptStack.Compiler.Parser.For(), ScriptStack.Compiler.Parser.ForEach(), ScriptStack.Compiler.Parser.FunctionDeclaration(), ScriptStack.Compiler.Parser.If(), ScriptStack.Compiler.Parser.IsMember(), ScriptStack.Compiler.Parser.IsPointer(), ScriptStack.Compiler.Parser.LocalVariableDeclaration(), ScriptStack.Compiler.Parser.LockedStatementList(), ScriptStack.Compiler.Parser.MemberAssignment(), ScriptStack.Compiler.Parser.Notify(), ScriptStack.Compiler.Parser.Or(), ScriptStack.Compiler.Parser.ParseScript(), ScriptStack.Compiler.Parser.PostDecrement(), ScriptStack.Compiler.Parser.PostIncrement(), ScriptStack.Compiler.Parser.PreDecrement(), ScriptStack.Compiler.Parser.PreIncrement(), ScriptStack.Compiler.Parser.ReadComma(), ScriptStack.Compiler.Parser.ReadIdentifier(), ScriptStack.Compiler.Parser.ReadLeftBrace(), ScriptStack.Compiler.Parser.ReadLeftBracket(), ScriptStack.Compiler.Parser.ReadLeftParenthesis(), ScriptStack.Compiler.Parser.ReadPeriod(), ScriptStack.Compiler.Parser.ReadRightBrace(), ScriptStack.Compiler.Parser.ReadRightBracket(), ScriptStack.Compiler.Parser.ReadRightParenthesis(), ScriptStack.Compiler.Parser.ReadSemicolon(), ScriptStack.Compiler.Parser.Relation(), ScriptStack.Compiler.Parser.Return(), ScriptStack.Compiler.Parser.Run(), ScriptStack.Compiler.Parser.ShiftLeft(), ScriptStack.Compiler.Parser.ShiftRight(), ScriptStack.Compiler.Parser.Statement(), ScriptStack.Compiler.Parser.StructDeclaration(), ScriptStack.Compiler.Parser.Switch(), ScriptStack.Compiler.Parser.Term(), ScriptStack.Compiler.Parser.VariableAssignment(), ScriptStack.Compiler.Parser.VariableDeclaration(), ScriptStack.Compiler.Parser.Wait(), ScriptStack.Compiler.Parser.While(), ScriptStack.Compiler.Parser.Xor() und ScriptStack.Compiler.Parser.Yield().


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Datei: