#[repr(u8)]pub enum SwiftElementType {
Show 155 variants
Whitespace = 0,
Newline = 1,
Comment = 2,
Identifier = 3,
Error = 4,
Eof = 5,
NumberLiteral = 6,
StringLiteral = 7,
CharLiteral = 8,
BooleanLiteral = 9,
Class = 10,
Struct = 11,
Enum = 12,
Protocol = 13,
Extension = 14,
Func = 15,
Var = 16,
Let = 17,
Init = 18,
Deinit = 19,
Subscript = 20,
Typealias = 21,
Import = 22,
If = 23,
Else = 24,
Switch = 25,
Case = 26,
Default = 27,
For = 28,
While = 29,
Repeat = 30,
Do = 31,
Break = 32,
Continue = 33,
Fallthrough = 34,
Return = 35,
Throw = 36,
Try = 37,
Catch = 38,
Finally = 39,
Guard = 40,
Defer = 41,
Public = 42,
Private = 43,
Internal = 44,
Fileprivate = 45,
Open = 46,
Static = 47,
Final = 48,
Override = 49,
Mutating = 50,
Nonmutating = 51,
Lazy = 52,
Weak = 53,
Unowned = 54,
Optional = 55,
Required = 56,
Convenience = 57,
Dynamic = 58,
Infix = 59,
Prefix = 60,
Postfix = 61,
Any = 62,
AnyObject = 63,
Self_ = 64,
Type = 65,
Protocol_ = 66,
True = 67,
False = 68,
Nil = 69,
As = 70,
Is = 71,
In = 72,
Where = 73,
Associatedtype = 74,
Operator = 75,
Precedencegroup = 76,
Indirect = 77,
Rethrows = 78,
Throws = 79,
Inout = 80,
Plus = 81,
Minus = 82,
Star = 83,
Slash = 84,
Percent = 85,
Equal = 86,
NotEqual = 87,
Less = 88,
Greater = 89,
LessEqual = 90,
GreaterEqual = 91,
LogicalAnd = 92,
LogicalOr = 93,
LogicalNot = 94,
BitAnd = 95,
BitOr = 96,
BitXor = 97,
BitNot = 98,
LeftShift = 99,
RightShift = 100,
Assign = 101,
PlusAssign = 102,
MinusAssign = 103,
StarAssign = 104,
SlashAssign = 105,
PercentAssign = 106,
AndAssign = 107,
OrAssign = 108,
XorAssign = 109,
LeftShiftAssign = 110,
RightShiftAssign = 111,
Question = 112,
QuestionQuestion = 113,
Dot = 114,
Arrow = 115,
Range = 116,
ClosedRange = 117,
LeftParen = 118,
RightParen = 119,
LeftBracket = 120,
RightBracket = 121,
LeftBrace = 122,
RightBrace = 123,
Comma = 124,
Semicolon = 125,
Colon = 126,
At = 127,
Hash = 128,
Dollar = 129,
Underscore = 130,
Backslash = 131,
SourceFile = 132,
FunctionDeclaration = 133,
Parameter = 134,
ParameterList = 135,
VariableDeclaration = 136,
ClassDeclaration = 137,
StructDeclaration = 138,
EnumDeclaration = 139,
ProtocolDeclaration = 140,
IfStatement = 141,
WhileStatement = 142,
ForStatement = 143,
ReturnStatement = 144,
BreakStatement = 145,
ContinueStatement = 146,
ExpressionStatement = 147,
Block = 148,
BinaryExpression = 149,
UnaryExpression = 150,
CallExpression = 151,
MemberExpression = 152,
IdentifierExpression = 153,
LiteralExpression = 154,
}Expand description
Element types for the Swift parser.
Variants§
Whitespace = 0
Whitespace characters.
Newline = 1
Line breaks.
Comment = 2
Comments.
Identifier = 3
Identifiers.
Error = 4
Error element.
Eof = 5
End of stream.
NumberLiteral = 6
Numeric literals.
StringLiteral = 7
String literals.
CharLiteral = 8
Character literals.
BooleanLiteral = 9
Boolean literals.
Class = 10
The class keyword.
Struct = 11
The struct keyword.
Enum = 12
The enum keyword.
Protocol = 13
The protocol keyword.
Extension = 14
The extension keyword.
Func = 15
The func keyword.
Var = 16
The var keyword.
Let = 17
The let keyword.
Init = 18
The init keyword.
Deinit = 19
The deinit keyword.
Subscript = 20
The subscript keyword.
Typealias = 21
The typealias keyword.
Import = 22
The import keyword.
If = 23
The if keyword.
Else = 24
The else keyword.
Switch = 25
The switch keyword.
Case = 26
The case keyword.
Default = 27
The default keyword.
For = 28
The for keyword.
While = 29
The while keyword.
Repeat = 30
The repeat keyword.
Do = 31
The do keyword.
Break = 32
The break keyword.
Continue = 33
The continue keyword.
Fallthrough = 34
The fallthrough keyword.
Return = 35
The return keyword.
Throw = 36
The throw keyword.
Try = 37
The try keyword.
Catch = 38
The catch keyword.
Finally = 39
The finally keyword.
Guard = 40
The guard keyword.
Defer = 41
The defer keyword.
Public = 42
The public keyword.
Private = 43
The private keyword.
Internal = 44
The internal keyword.
Fileprivate = 45
The fileprivate keyword.
Open = 46
The open keyword.
Static = 47
The static keyword.
Final = 48
The final keyword.
Override = 49
The override keyword.
Mutating = 50
The mutating keyword.
Nonmutating = 51
The nonmutating keyword.
Lazy = 52
The lazy keyword.
Weak = 53
The weak keyword.
Unowned = 54
The unowned keyword.
Optional = 55
The optional keyword.
Required = 56
The required keyword.
Convenience = 57
The convenience keyword.
Dynamic = 58
The dynamic keyword.
Infix = 59
The infix keyword.
Prefix = 60
The prefix keyword.
Postfix = 61
The postfix keyword.
Any = 62
The Any keyword.
AnyObject = 63
The AnyObject keyword.
Self_ = 64
The self keyword.
Type = 65
The Self keyword.
Protocol_ = 66
The Protocol keyword.
True = 67
The true keyword.
False = 68
The false keyword.
Nil = 69
The nil keyword.
As = 70
The as keyword.
Is = 71
The is keyword.
In = 72
The in keyword.
Where = 73
The where keyword.
Associatedtype = 74
The associatedtype keyword.
Operator = 75
The operator keyword.
Precedencegroup = 76
The precedencegroup keyword.
Indirect = 77
The indirect keyword.
Rethrows = 78
The rethrows keyword.
Throws = 79
The throws keyword.
Inout = 80
The inout keyword.
Plus = 81
Plus operator (+).
Minus = 82
Minus operator (-).
Star = 83
Multiplication operator (*).
Slash = 84
Division operator (/).
Percent = 85
Modulo operator (%).
Equal = 86
Equality operator (==).
NotEqual = 87
Inequality operator (!=).
Less = 88
Less than operator (<).
Greater = 89
Greater than operator (>).
LessEqual = 90
Less than or equal to operator (<=).
GreaterEqual = 91
Greater than or equal to operator (>=).
LogicalAnd = 92
Logical AND operator (&&).
LogicalOr = 93
Logical OR operator (||).
LogicalNot = 94
Logical NOT operator (!).
BitAnd = 95
Bitwise AND operator (&).
BitOr = 96
Bitwise OR operator (|).
BitXor = 97
Bitwise XOR operator (^).
BitNot = 98
Bitwise NOT operator (~).
LeftShift = 99
Left shift operator (<<).
RightShift = 100
Right shift operator (>>).
Assign = 101
Assignment operator (=).
PlusAssign = 102
Plus assignment operator (+=).
MinusAssign = 103
Minus assignment operator (-=).
StarAssign = 104
Multiplication assignment operator (*=).
SlashAssign = 105
Division assignment operator (/=).
PercentAssign = 106
Modulo assignment operator (%=).
AndAssign = 107
Bitwise AND assignment operator (&=).
OrAssign = 108
Bitwise OR assignment operator (|=).
XorAssign = 109
Bitwise XOR assignment operator (^=).
LeftShiftAssign = 110
Left shift assignment operator (<<=).
RightShiftAssign = 111
Right shift assignment operator (>>=).
Question = 112
Question mark (?).
QuestionQuestion = 113
Nil-coalescing operator (??).
Dot = 114
Dot operator (.).
Arrow = 115
Arrow operator (->).
Range = 116
Half-open range operator (..<).
ClosedRange = 117
Closed range operator (...).
LeftParen = 118
Left parenthesis (().
RightParen = 119
Right parenthesis ()).
LeftBracket = 120
Left bracket ([).
RightBracket = 121
Right bracket (]).
LeftBrace = 122
Left brace ({).
RightBrace = 123
Right brace (}).
Comma = 124
Comma (,).
Semicolon = 125
Semicolon (;).
Colon = 126
Colon (:).
At = 127
At sign (@).
Hash = 128
Hash sign (#).
Dollar = 129
Dollar sign ($).
Underscore = 130
Underscore (_).
Backslash = 131
Backslash (\).
SourceFile = 132
Source file node.
FunctionDeclaration = 133
Function declaration node.
Parameter = 134
Parameter node.
ParameterList = 135
Parameter list node.
VariableDeclaration = 136
Variable declaration node.
ClassDeclaration = 137
Class declaration node.
StructDeclaration = 138
Struct declaration node.
EnumDeclaration = 139
Enum declaration node.
ProtocolDeclaration = 140
Protocol declaration node.
IfStatement = 141
If statement node.
WhileStatement = 142
While statement node.
ForStatement = 143
For statement node.
ReturnStatement = 144
Return statement node.
BreakStatement = 145
Break statement node.
ContinueStatement = 146
Continue statement node.
ExpressionStatement = 147
Expression statement node.
Block = 148
Code block node.
BinaryExpression = 149
Binary expression node.
UnaryExpression = 150
Unary expression node.
CallExpression = 151
Function call expression node.
MemberExpression = 152
Member access expression node.
IdentifierExpression = 153
Identifier expression node.
LiteralExpression = 154
Literal expression node.
Implementations§
Trait Implementations§
Source§impl Clone for SwiftElementType
impl Clone for SwiftElementType
Source§fn clone(&self) -> SwiftElementType
fn clone(&self) -> SwiftElementType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more