pub enum Keyword {
Show 38 variants
If,
Do,
Else,
Int,
Float,
String,
Object,
Return,
While,
For,
Void,
Case,
Break,
Struct,
Action,
Switch,
Default,
Include,
Continue,
Vector,
Const,
Define,
ObjectSelf,
ObjectInvalid,
EngineNumStructuresDefinition,
EngineStructureDefinition,
JsonNull,
JsonFalse,
JsonTrue,
JsonObject,
JsonArray,
JsonString,
LocationInvalid,
FunctionMacro,
FileMacro,
LineMacro,
DateMacro,
TimeMacro,
}Expand description
One NWScript keyword or builtin token recognized during lexing.
Variants§
If
if
Do
do
Else
else
Int
int
Float
float
String
string
Object
object
Return
return
While
while
For
for
Void
void
Case
case
Break
break
Struct
struct
Action
action
Switch
switch
Default
default
Include
#include
Continue
continue
Vector
vector
Const
const
Define
#define
ObjectSelf
OBJECT_SELF
ObjectInvalid
OBJECT_INVALID
EngineNumStructuresDefinition
ENGINE_NUM_STRUCTURES
EngineStructureDefinition
ENGINE_STRUCTURE_0 through ENGINE_STRUCTURE_9
JsonNull
JSON_NULL
JsonFalse
JSON_FALSE
JsonTrue
JSON_TRUE
JsonObject
JSON_OBJECT
JsonArray
JSON_ARRAY
JsonString
JSON_STRING
LocationInvalid
LOCATION_INVALID
FunctionMacro
__FUNCTION__
FileMacro
__FILE__
LineMacro
__LINE__
DateMacro
__DATE__
TimeMacro
__TIME__
Implementations§
Source§impl Keyword
impl Keyword
Sourcepub const fn upstream_token_code(self) -> u16
pub const fn upstream_token_code(self) -> u16
Returns the upstream token code from scriptinternal.h.
Sourcepub fn from_lexeme(input: &str) -> Option<Self>
pub fn from_lexeme(input: &str) -> Option<Self>
Resolves a keyword from its exact source spelling.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Keyword
impl<'de> Deserialize<'de> for Keyword
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Keyword
impl Eq for Keyword
impl StructuralPartialEq for Keyword
Auto Trait Implementations§
impl Freeze for Keyword
impl RefUnwindSafe for Keyword
impl Send for Keyword
impl Sync for Keyword
impl Unpin for Keyword
impl UnsafeUnpin for Keyword
impl UnwindSafe for Keyword
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.