1#[derive(Copy, Clone, Debug, PartialEq, Eq, serde::Serialize)]
2pub enum ActionScriptSyntaxKind {
3 Whitespace,
5 Newline,
6 Comment,
7
8 Identifier,
10 StringLiteral,
11 CharLiteral,
12 NumberLiteral,
13 BooleanLiteral,
14 NullLiteral,
15
16 As,
18 Break,
19 Case,
20 Catch,
21 Class,
22 Const,
23 Continue,
24 Default,
25 Delete,
26 Do,
27 Else,
28 Extends,
29 False,
30 Finally,
31 For,
32 Function,
33 If,
34 Implements,
35 Import,
36 In,
37 Instanceof,
38 Interface,
39 Internal,
40 Is,
41 Native,
42 New,
43 Null,
44 Package,
45 Private,
46 Protected,
47 Public,
48 Return,
49 Static,
50 Super,
51 Switch,
52 This,
53 Throw,
54 True,
55 Try,
56 Typeof,
57 Use,
58 Var,
59 Void,
60 While,
61 With,
62
63 Each,
65 Get,
66 Set,
67 Namespace,
68 Include,
69 Dynamic,
70 Final,
71 Override,
72
73 Array,
75 Boolean,
76 Date,
77 Function_,
78 Number,
79 Object,
80 RegExp,
81 String_,
82 Uint,
83 Vector,
84 Void_,
85 Xml,
86 XmlList,
87
88 Plus, Minus, Star, Slash, Percent, Equal, EqualEqual, EqualEqualEqual, NotEqual, NotEqualEqual, LessThan, LessEqual, GreaterThan, GreaterEqual, LogicalAnd, LogicalOr, LogicalNot, BitwiseAnd, BitwiseOr, BitwiseXor, BitwiseNot, LeftShift, RightShift, UnsignedRightShift, Increment, Decrement, PlusAssign, MinusAssign, StarAssign, SlashAssign, PercentAssign, LeftShiftAssign, RightShiftAssign, UnsignedRightShiftAssign, BitwiseAndAssign, BitwiseOrAssign, BitwiseXorAssign, Question, Colon, LeftParen, RightParen, LeftBrace, RightBrace, LeftBracket, RightBracket, Semicolon, Comma, Dot, Arrow, At, Hash, Dollar, Ampersand, Backslash, Quote, DoubleQuote, Backtick, Program,
153 Statement,
154 Expression,
155 Block,
156 ClassDeclaration,
157 InterfaceDeclaration,
158 FunctionDeclaration,
159 VariableDeclaration,
160 ImportStatement,
161 PackageDeclaration,
162 NamespaceDeclaration,
163 Assignment,
164 FunctionCall,
165 MethodCall,
166 PropertyAccess,
167 ArrayAccess,
168 ConditionalExpression,
169 BinaryExpression,
170 UnaryExpression,
171 IfStatement,
172 ForStatement,
173 WhileStatement,
174 DoWhileStatement,
175 SwitchStatement,
176 TryStatement,
177 ThrowStatement,
178 ReturnStatement,
179 BreakStatement,
180 ContinueStatement,
181
182 Error,
184 Eof,
185}
186
187impl oak_core::SyntaxKind for ActionScriptSyntaxKind {
188 fn is_trivia(&self) -> bool {
189 matches!(self, Self::Whitespace | Self::Newline | Self::Comment)
190 }
191
192 fn is_comment(&self) -> bool {
193 matches!(self, Self::Comment)
194 }
195
196 fn is_whitespace(&self) -> bool {
197 matches!(self, Self::Whitespace | Self::Newline)
198 }
199
200 fn is_token_type(&self) -> bool {
201 !matches!(
202 self,
203 Self::Program
204 | Self::Statement
205 | Self::Expression
206 | Self::Block
207 | Self::ClassDeclaration
208 | Self::InterfaceDeclaration
209 | Self::FunctionDeclaration
210 | Self::VariableDeclaration
211 | Self::ImportStatement
212 | Self::PackageDeclaration
213 | Self::NamespaceDeclaration
214 | Self::Assignment
215 | Self::FunctionCall
216 | Self::MethodCall
217 | Self::PropertyAccess
218 | Self::ArrayAccess
219 | Self::ConditionalExpression
220 | Self::BinaryExpression
221 | Self::UnaryExpression
222 | Self::IfStatement
223 | Self::ForStatement
224 | Self::WhileStatement
225 | Self::DoWhileStatement
226 | Self::SwitchStatement
227 | Self::TryStatement
228 | Self::ThrowStatement
229 | Self::ReturnStatement
230 | Self::BreakStatement
231 | Self::ContinueStatement
232 )
233 }
234
235 fn is_element_type(&self) -> bool {
236 matches!(
237 self,
238 Self::Program
239 | Self::Statement
240 | Self::Expression
241 | Self::Block
242 | Self::ClassDeclaration
243 | Self::InterfaceDeclaration
244 | Self::FunctionDeclaration
245 | Self::VariableDeclaration
246 | Self::ImportStatement
247 | Self::PackageDeclaration
248 | Self::NamespaceDeclaration
249 | Self::Assignment
250 | Self::FunctionCall
251 | Self::MethodCall
252 | Self::PropertyAccess
253 | Self::ArrayAccess
254 | Self::ConditionalExpression
255 | Self::BinaryExpression
256 | Self::UnaryExpression
257 | Self::IfStatement
258 | Self::ForStatement
259 | Self::WhileStatement
260 | Self::DoWhileStatement
261 | Self::SwitchStatement
262 | Self::TryStatement
263 | Self::ThrowStatement
264 | Self::ReturnStatement
265 | Self::BreakStatement
266 | Self::ContinueStatement
267 )
268 }
269}
270
271pub type ActionScriptToken = oak_core::Token<ActionScriptSyntaxKind>;