pub enum ZigTokenType {
Show 171 variants
Root,
Whitespace,
Newline,
Comment,
DocComment,
Error,
Eof,
Identifier,
StringLiteral,
CharLiteral,
IntegerLiteral,
FloatLiteral,
BooleanLiteral,
Const,
Var,
Fn,
Struct,
Union,
Enum,
Opaque,
Type,
Comptime,
Inline,
NoInline,
Pub,
Export,
Extern,
Packed,
Align,
CallConv,
LinkSection,
If,
Else,
Switch,
While,
For,
Break,
Continue,
Return,
Defer,
ErrDefer,
Unreachable,
NoReturn,
ErrorKeyword,
Test,
Async,
Await,
Suspend,
Resume,
Cancel,
Undefined,
Null,
Volatile,
AllowZero,
NoAlias,
And,
Or,
AnyFrame,
AnyType,
ThreadLocal,
Bool,
I8,
I16,
I32,
I64,
I128,
Isize,
U8,
U16,
U32,
U64,
U128,
Usize,
F16,
F32,
F64,
F80,
F128,
CShort,
CUshort,
CInt,
CUint,
CLong,
CUlong,
CLongLong,
CUlongLong,
CLongDouble,
CVoid,
Void,
ComptimeInt,
ComptimeFloat,
Plus,
Minus,
Star,
Slash,
Percent,
StarStar,
PlusPercent,
MinusPercent,
StarPercent,
PlusPlus,
MinusMinus,
Ampersand,
Pipe,
Caret,
Tilde,
LessLess,
GreaterGreater,
Equal,
NotEqual,
Less,
Greater,
LessEqual,
GreaterEqual,
AndAnd,
OrOr,
Assign,
PlusAssign,
MinusAssign,
StarAssign,
SlashAssign,
PercentAssign,
AmpersandAssign,
PipeAssign,
CaretAssign,
LessLessAssign,
GreaterGreaterAssign,
LeftParen,
RightParen,
LeftBrace,
RightBrace,
LeftBracket,
RightBracket,
Semicolon,
Comma,
Dot,
DotDot,
DotDotDot,
DotQuestion,
DotStar,
Colon,
Question,
Exclamation,
Arrow,
FatArrow,
OrElse,
CatchKeyword,
TryKeyword,
AwaitKeyword,
At,
BuiltinIdentifier,
StringStart,
StringEnd,
StringContent,
InterpolationStart,
InterpolationEnd,
MultilineStringStart,
MultilineStringEnd,
MultilineStringContent,
CompileDirective,
Text,
VarDeclaration,
FnDeclaration,
StructDeclaration,
EnumDeclaration,
UnionDeclaration,
Block,
IfStatement,
WhileStatement,
ForStatement,
ReturnStatement,
}Variants§
Root
Whitespace
Newline
Comment
DocComment
Error
Eof
Identifier
StringLiteral
CharLiteral
IntegerLiteral
FloatLiteral
BooleanLiteral
Const
Var
Fn
Struct
Union
Enum
Opaque
Type
Comptime
Inline
NoInline
Pub
Export
Extern
Packed
Align
CallConv
LinkSection
If
Else
Switch
While
For
Break
Continue
Return
Defer
ErrDefer
Unreachable
NoReturn
ErrorKeyword
Test
Async
Await
Suspend
Resume
Cancel
Undefined
Null
Volatile
AllowZero
NoAlias
And
Or
AnyFrame
AnyType
ThreadLocal
Bool
I8
I16
I32
I64
I128
Isize
U8
U16
U32
U64
U128
Usize
F16
F32
F64
F80
F128
CShort
CUshort
CInt
CUint
CLong
CUlong
CLongLong
CUlongLong
CLongDouble
CVoid
Void
ComptimeInt
ComptimeFloat
Plus
Minus
Star
Slash
Percent
StarStar
PlusPercent
MinusPercent
StarPercent
PlusPlus
MinusMinus
Ampersand
Pipe
Caret
Tilde
LessLess
GreaterGreater
Equal
NotEqual
Less
Greater
LessEqual
GreaterEqual
AndAnd
OrOr
Assign
PlusAssign
MinusAssign
StarAssign
SlashAssign
PercentAssign
AmpersandAssign
PipeAssign
CaretAssign
LessLessAssign
GreaterGreaterAssign
LeftParen
RightParen
LeftBrace
RightBrace
LeftBracket
RightBracket
Semicolon
Comma
Dot
DotDot
DotDotDot
DotQuestion
DotStar
Colon
Question
Exclamation
Arrow
FatArrow
OrElse
CatchKeyword
TryKeyword
AwaitKeyword
At
BuiltinIdentifier
StringStart
StringEnd
StringContent
InterpolationStart
InterpolationEnd
MultilineStringStart
MultilineStringEnd
MultilineStringContent
CompileDirective
Text
VarDeclaration
FnDeclaration
StructDeclaration
EnumDeclaration
UnionDeclaration
Block
IfStatement
WhileStatement
ForStatement
ReturnStatement
Trait Implementations§
Source§impl Clone for ZigTokenType
impl Clone for ZigTokenType
Source§fn clone(&self) -> ZigTokenType
fn clone(&self) -> ZigTokenType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ZigTokenType
impl Debug for ZigTokenType
Source§impl<'de> Deserialize<'de> for ZigTokenType
impl<'de> Deserialize<'de> for ZigTokenType
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
Source§impl From<ZigTokenType> for ZigElementType
impl From<ZigTokenType> for ZigElementType
Source§fn from(token: ZigTokenType) -> Self
fn from(token: ZigTokenType) -> Self
Converts to this type from the input type.
Source§impl Hash for ZigTokenType
impl Hash for ZigTokenType
Source§impl PartialEq for ZigTokenType
impl PartialEq for ZigTokenType
Source§impl Serialize for ZigTokenType
impl Serialize for ZigTokenType
Source§impl TokenType for ZigTokenType
impl TokenType for ZigTokenType
Source§const END_OF_STREAM: Self = Self::Eof
const END_OF_STREAM: Self = Self::Eof
A constant representing the end of the input stream. Read more
Source§type Role = UniversalTokenRole
type Role = UniversalTokenRole
The associated role type for this token kind.
Source§fn is_ignored(&self) -> bool
fn is_ignored(&self) -> bool
Returns true if this token represents trivia (whitespace, comments, etc.). Read more
Source§fn is_role(&self, role: Self::Role) -> bool
fn is_role(&self, role: Self::Role) -> bool
Returns true if this token matches the specified language-specific role.
Source§fn is_universal(&self, role: UniversalTokenRole) -> bool
fn is_universal(&self, role: UniversalTokenRole) -> bool
Returns true if this token matches the specified universal role.
Source§fn is_comment(&self) -> bool
fn is_comment(&self) -> bool
Returns true if this token represents a comment. Read more
Source§fn is_whitespace(&self) -> bool
fn is_whitespace(&self) -> bool
Returns true if this token represents whitespace. Read more
Source§fn is_error(&self) -> bool
fn is_error(&self) -> bool
Returns true if this token represents an error condition. Read more
Source§fn is_end_of_stream(&self) -> bool
fn is_end_of_stream(&self) -> bool
Returns true if this token represents the end of the input stream. Read more
impl Copy for ZigTokenType
impl Eq for ZigTokenType
impl StructuralPartialEq for ZigTokenType
Auto Trait Implementations§
impl Freeze for ZigTokenType
impl RefUnwindSafe for ZigTokenType
impl Send for ZigTokenType
impl Sync for ZigTokenType
impl Unpin for ZigTokenType
impl UnwindSafe for ZigTokenType
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