Enum databind::Token [−][src]
pub enum Token {
Show 43 variants
Var,
Objective,
SetObjective,
TestVar,
GetVar,
DefineFunc,
FuncName(String),
EndFunc,
Tag,
TagName(String),
CallFunc,
IfStatement,
IfCondition(String),
IfContents(String),
ElseStatement,
EndIf,
WhileLoop,
WhileCondition(String),
WhileContents(String),
EndWhileLoop,
ModVarName(String),
TestVarName(String),
DelVarName(String),
OpVarName(String),
ObjectiveName(String),
ObjectiveType(String),
DeleteVar,
Target(String),
InitialSet,
VarSet,
VarAdd,
VarSub,
Int(i32),
DefineMacro,
CallMacro,
MacroName(String, usize, usize),
MacroContents(String),
EndMacro,
DefArgList(Vec<String>),
CallArgList(Vec<String>),
NonDatabind(String),
NewLine,
None,
}
Expand description
The enum of Databind tokens used for tokenization of Databind source files
Variants
Used before a mention of a variable (Token::VarName
)
Used before an objective definition
Used before an objective modification
Used before a variable (Token::VarName
) to test
Used before a variable (Token::VarName
) to get.
Meant for scoreboard operations (sbop
)
Define a function
FuncName(String)
The name of a function
Tuple Fields of FuncName
0: String
End a function definition
Add a tag to a function
TagName(String)
The name of a tag
Tuple Fields of TagName
0: String
Call a funcition
Start an if statement
IfCondition(String)
The condition for an if statement
Tuple Fields of IfCondition
0: String
IfContents(String)
The contents of an if or else statement
Tuple Fields of IfContents
0: String
An else statement if the if statement condition was not true
Close an if statement
Start a while loop
WhileCondition(String)
The condition for a while loop
Tuple Fields of WhileCondition
0: String
WhileContents(String)
The string contents of a while loop
Tuple Fields of WhileContents
0: String
Close a while loop
ModVarName(String)
A variable’s name for modifying
Tuple Fields of ModVarName
0: String
TestVarName(String)
A variable’s name for testing
Tuple Fields of TestVarName
0: String
DelVarName(String)
A variable’s name for deleting
Tuple Fields of DelVarName
0: String
OpVarName(String)
A variable’s name for scoreboard operations
Tuple Fields of OpVarName
0: String
ObjectiveName(String)
An objective’s name
Tuple Fields of ObjectiveName
0: String
ObjectiveType(String)
An objective’s type (eg. deathCount)
Tuple Fields of ObjectiveType
0: String
Delete a variable or objective
Target(String)
A targeted entity (eg. Username
or @a
)
Tuple Fields of Target
0: String
Set the initial value of a variable
Set the value of a variable or objective
Add to the value of a variable or objective
Subtract from the value of a variable or objective
Int(i32)
An integer
Tuple Fields of Int
0: i32
Define a Databind macro
Call a Databind macro
The name of a Databind macro
The first usize
is for the line with the macro name,
and the second is for the column
MacroContents(String)
The contents of a macro
Tuple Fields of MacroContents
0: String
Close a Databind macro definition
A list of either argument names for a macro definition
A list of argument values for a macro call
NonDatabind(String)
Commands, etc. that are not by databind
In the command execute if :tvar variable #etc
execute if
would be tokenized as NonDatabind.
Tuple Fields of NonDatabind
0: String
A new line
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Token
impl UnwindSafe for Token
Blanket Implementations
Mutably borrows from an owned value. Read more