2 The classes in this module model the entire AST for the language.
4 The actual AST classes and supporting modules are generated
9 class CompileUnit(Node
):
10 Modules
as ModuleCollection
12 enum TypeMemberModifiers
:
27 enum MethodImplementationFlags
:
31 enum ParameterModifiers
:
37 enum ExceptionHandlerFlags
:
43 abstract class TypeMember(Node
, INodeWithAttributes
):
44 Modifiers
as TypeMemberModifiers
46 Attributes
as AttributeCollection
48 class ExplicitMemberInfo(Node
):
49 InterfaceType
as SimpleTypeReference
51 [collection(TypeMember
)]
52 class TypeMemberCollection
:
55 abstract class TypeReference(Node
):
58 class SimpleTypeReference(TypeReference
):
61 class ArrayTypeReference(TypeReference
):
62 ElementType
as TypeReference
63 Rank
as IntegerLiteralExpression
65 class CallableTypeReference(TypeReference
):
66 Parameters
as ParameterDeclarationCollection
67 ReturnType
as TypeReference
69 class GenericTypeReference(SimpleTypeReference
):
70 GenericArguments
as TypeReferenceCollection
72 class GenericTypeDefinitionReference(SimpleTypeReference
):
73 GenericPlaceholders
as int
75 [collection(TypeReference
)]
76 class TypeReferenceCollection
:
79 class CallableDefinition(TypeMember
, INodeWithParameters
):
80 Parameters
as ParameterDeclarationCollection
81 GenericParameters
as GenericParameterDeclarationCollection
82 ReturnType
as TypeReference
83 ReturnTypeAttributes
as AttributeCollection
85 abstract class TypeDefinition(TypeMember
):
86 Members
as TypeMemberCollection
87 BaseTypes
as TypeReferenceCollection
88 GenericParameters
as GenericParameterDeclarationCollection
90 [collection(TypeDefinition
)]
91 class TypeDefinitionCollection
:
94 class NamespaceDeclaration(Node
):
99 AssemblyReference
as ReferenceExpression
100 Alias
as ReferenceExpression
103 class ImportCollection
:
106 class Module(TypeDefinition
):
107 Namespace
as NamespaceDeclaration
108 Imports
as ImportCollection
111 AssemblyAttributes
as AttributeCollection
114 class ModuleCollection
:
117 class ClassDefinition(TypeDefinition
):
120 class StructDefinition(TypeDefinition
):
123 class InterfaceDefinition(TypeDefinition
):
126 class EnumDefinition(TypeDefinition
):
129 class EnumMember(TypeMember
):
130 Initializer
as IntegerLiteralExpression
132 class Field(TypeMember
):
133 Type
as TypeReference
134 Initializer
as Expression
136 class Property(TypeMember
, INodeWithParameters
, IExplicitMember
):
137 Parameters
as ParameterDeclarationCollection
140 Type
as TypeReference
141 ExplicitInfo
as ExplicitMemberInfo
143 class Event(TypeMember
):
147 Type
as TypeReference
153 class LocalCollection
:
156 class BlockExpression(Expression
, INodeWithParameters
):
157 Parameters
as ParameterDeclarationCollection
158 ReturnType
as TypeReference
162 class Method(CallableDefinition
, IExplicitMember
):
165 Locals
as LocalCollection
166 ImplementationFlags
as MethodImplementationFlags
167 ExplicitInfo
as ExplicitMemberInfo
169 class Constructor(Method
):
172 class Destructor(Method
):
175 class ParameterDeclaration(Node
, INodeWithAttributes
):
177 Type
as TypeReference
178 Modifiers
as ParameterModifiers
179 Attributes
as AttributeCollection
181 [collection(ParameterDeclaration
)]
182 class ParameterDeclarationCollection
:
185 class GenericParameterDeclaration(Node
):
188 [collection(GenericParameterDeclaration
)]
189 class GenericParameterDeclarationCollection
:
192 class Declaration(Node
):
194 Type
as TypeReference
196 [collection(Declaration
)]
197 class DeclarationCollection
:
200 class Attribute(Node
, INodeWithArguments
):
202 Arguments
as ExpressionCollection
203 NamedArguments
as ExpressionPairCollection
205 [collection(Attribute
)]
206 class AttributeCollection
:
209 enum StatementModifierType
:
215 class StatementModifier(Node
):
216 Type
as StatementModifierType
217 Condition
as Expression
219 abstract class Statement(Node
):
220 Modifier
as StatementModifier
222 class GotoStatement(Statement
):
223 Label
as ReferenceExpression
225 class LabelStatement(Statement
):
228 class Block(Statement
):
229 Statements
as StatementCollection
231 [collection(Statement
)]
232 class StatementCollection
:
235 class DeclarationStatement(Statement
):
236 Declaration
as Declaration
237 Initializer
as Expression
239 class MacroStatement(Statement
):
241 Arguments
as ExpressionCollection
246 class TryStatement(Statement
):
248 ProtectedBlock
as Block
249 ExceptionHandlers
as ExceptionHandlerCollection
250 FailureBlock
as Block
253 class ExceptionHandler(Node
):
254 Declaration
as Declaration
255 FilterCondition
as Expression
256 Flags
as ExceptionHandlerFlags
261 [collection(ExceptionHandler
)]
262 class ExceptionHandlerCollection
:
265 class IfStatement(Statement
):
266 Condition
as Expression
270 class UnlessStatement(Statement
):
271 Condition
as Expression
276 class ForStatement(Statement
):
277 Declarations
as DeclarationCollection
278 Iterator
as Expression
283 class WhileStatement(Statement
):
284 Condition
as Expression
289 class BreakStatement(Statement
):
292 class ContinueStatement(Statement
):
295 class ReturnStatement(Statement
):
296 Expression
as Expression
298 class YieldStatement(Statement
):
299 Expression
as Expression
301 class RaiseStatement(Statement
):
302 Exception
as Expression
304 class UnpackStatement(Statement
):
305 Declarations
as DeclarationCollection
306 Expression
as Expression
308 class ExpressionStatement(Statement
):
310 Expression
as Expression
312 abstract class Expression(Node
):
315 [collection(Expression
)]
316 class ExpressionCollection
:
320 class OmittedExpression(Expression
):
323 class ExpressionPair(Node
):
327 [collection(ExpressionPair
)]
328 class ExpressionPairCollection
:
331 class MethodInvocationExpression(Expression
, INodeWithArguments
):
333 Arguments
as ExpressionCollection
334 NamedArguments
as ExpressionPairCollection
336 enum BinaryOperatorType
:
375 enum UnaryOperatorType
:
386 class UnaryExpression(Expression
):
387 Operator
as UnaryOperatorType
388 Operand
as Expression
390 class BinaryExpression(Expression
):
391 Operator
as BinaryOperatorType
395 class ConditionalExpression(Expression
):
396 Condition
as Expression
397 TrueValue
as Expression
398 FalseValue
as Expression
400 class ReferenceExpression(Expression
):
403 class MemberReferenceExpression(ReferenceExpression
):
406 class GenericReferenceExpression(Expression
):
408 GenericArguments
as TypeReferenceCollection
410 abstract class LiteralExpression(Expression
):
413 class QuasiquoteExpression(LiteralExpression
):
416 class StringLiteralExpression(LiteralExpression
):
419 class CharLiteralExpression(StringLiteralExpression
):
422 class TimeSpanLiteralExpression(LiteralExpression
):
423 Value
as System
.TimeSpan
425 class IntegerLiteralExpression(LiteralExpression
):
429 class DoubleLiteralExpression(LiteralExpression
):
433 class NullLiteralExpression(LiteralExpression
):
436 class SelfLiteralExpression(LiteralExpression
):
439 class SuperLiteralExpression(LiteralExpression
):
442 class BoolLiteralExpression(LiteralExpression
):
445 class RELiteralExpression(LiteralExpression
):
448 class SpliceExpression(Expression
):
449 Expression
as Expression
451 class SpliceTypeReference(TypeReference
):
452 Expression
as Expression
454 class SpliceMemberReferenceExpression(Expression
):
456 NameExpression
as Expression
458 class SpliceTypeMember(TypeMember
):
459 TypeMember
as TypeMember
460 NameExpression
as Expression
462 class SpliceParameterDeclaration(ParameterDeclaration
):
463 ParameterDeclaration
as ParameterDeclaration
464 NameExpression
as Expression
466 class ExpressionInterpolationExpression(Expression
):
467 Expressions
as ExpressionCollection
469 class HashLiteralExpression(LiteralExpression
):
470 Items
as ExpressionPairCollection
472 class ListLiteralExpression(LiteralExpression
):
473 Items
as ExpressionCollection
475 class ArrayLiteralExpression(ListLiteralExpression
):
476 Type
as ArrayTypeReference
478 class GeneratorExpression(Expression
):
479 Expression
as Expression
480 Declarations
as DeclarationCollection
481 Iterator
as Expression
482 Filter
as StatementModifier
484 class ExtendedGeneratorExpression(Expression
):
485 Items
as GeneratorExpressionCollection
487 [collection(GeneratorExpression
)]
488 class GeneratorExpressionCollection
:
497 class SliceCollection
:
500 class SlicingExpression(Expression
):
502 Indices
as SliceCollection
504 class TryCastExpression(Expression
):
506 Type
as TypeReference
508 class CastExpression(Expression
):
510 Type
as TypeReference
512 class TypeofExpression(Expression
):
513 Type
as TypeReference