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
285 class WhileStatement(Statement
):
286 Condition
as Expression
293 class BreakStatement(Statement
):
296 class ContinueStatement(Statement
):
299 class ReturnStatement(Statement
):
300 Expression
as Expression
302 class YieldStatement(Statement
):
303 Expression
as Expression
305 class RaiseStatement(Statement
):
306 Exception
as Expression
308 class UnpackStatement(Statement
):
309 Declarations
as DeclarationCollection
310 Expression
as Expression
312 class ExpressionStatement(Statement
):
314 Expression
as Expression
316 abstract class Expression(Node
):
319 [collection(Expression
)]
320 class ExpressionCollection
:
324 class OmittedExpression(Expression
):
327 class ExpressionPair(Node
):
331 [collection(ExpressionPair
)]
332 class ExpressionPairCollection
:
335 class MethodInvocationExpression(Expression
, INodeWithArguments
):
337 Arguments
as ExpressionCollection
338 NamedArguments
as ExpressionPairCollection
340 enum BinaryOperatorType
:
379 enum UnaryOperatorType
:
390 class UnaryExpression(Expression
):
391 Operator
as UnaryOperatorType
392 Operand
as Expression
394 class BinaryExpression(Expression
):
395 Operator
as BinaryOperatorType
399 class ConditionalExpression(Expression
):
400 Condition
as Expression
401 TrueValue
as Expression
402 FalseValue
as Expression
404 class ReferenceExpression(Expression
):
407 class MemberReferenceExpression(ReferenceExpression
):
410 class GenericReferenceExpression(Expression
):
412 GenericArguments
as TypeReferenceCollection
414 abstract class LiteralExpression(Expression
):
417 class QuasiquoteExpression(LiteralExpression
):
420 class StringLiteralExpression(LiteralExpression
):
423 class CharLiteralExpression(StringLiteralExpression
):
426 class TimeSpanLiteralExpression(LiteralExpression
):
427 Value
as System
.TimeSpan
429 class IntegerLiteralExpression(LiteralExpression
):
433 class DoubleLiteralExpression(LiteralExpression
):
437 class NullLiteralExpression(LiteralExpression
):
440 class SelfLiteralExpression(LiteralExpression
):
443 class SuperLiteralExpression(LiteralExpression
):
446 class BoolLiteralExpression(LiteralExpression
):
449 class RELiteralExpression(LiteralExpression
):
452 class SpliceExpression(Expression
):
453 Expression
as Expression
455 class SpliceTypeReference(TypeReference
):
456 Expression
as Expression
458 class SpliceMemberReferenceExpression(Expression
):
460 NameExpression
as Expression
462 class SpliceTypeMember(TypeMember
):
463 TypeMember
as TypeMember
464 NameExpression
as Expression
466 class SpliceParameterDeclaration(ParameterDeclaration
):
467 ParameterDeclaration
as ParameterDeclaration
468 NameExpression
as Expression
470 class ExpressionInterpolationExpression(Expression
):
471 Expressions
as ExpressionCollection
473 class HashLiteralExpression(LiteralExpression
):
474 Items
as ExpressionPairCollection
476 class ListLiteralExpression(LiteralExpression
):
477 Items
as ExpressionCollection
479 class ArrayLiteralExpression(ListLiteralExpression
):
480 Type
as ArrayTypeReference
482 class GeneratorExpression(Expression
):
483 Expression
as Expression
484 Declarations
as DeclarationCollection
485 Iterator
as Expression
486 Filter
as StatementModifier
488 class ExtendedGeneratorExpression(Expression
):
489 Items
as GeneratorExpressionCollection
491 [collection(GeneratorExpression
)]
492 class GeneratorExpressionCollection
:
501 class SliceCollection
:
504 class SlicingExpression(Expression
):
506 Indices
as SliceCollection
508 class TryCastExpression(Expression
):
510 Type
as TypeReference
512 class CastExpression(Expression
):
514 Type
as TypeReference
516 class TypeofExpression(Expression
):
517 Type
as TypeReference