Files
codeql/csharp/ql/test/library-tests/constructors/PrintAst.expected
2024-02-19 13:04:13 +01:00

52 lines
2.0 KiB
Plaintext

constructors.cs:
# 1| [NamespaceDeclaration] namespace ... { ... }
# 3| 1: [Class] Class
# 5| 4: [InstanceConstructor] Class
# 6| 4: [BlockStmt] {...}
# 8| 5: [InstanceConstructor] Class
#-----| 2: (Parameters)
# 8| 0: [Parameter] i
# 8| -1: [TypeMention] int
# 9| 4: [BlockStmt] {...}
# 11| 6: [StaticConstructor] Class
# 12| 4: [BlockStmt] {...}
# 14| 7: [Destructor] ~Class
# 15| 4: [BlockStmt] {...}
# 16| 0: [LocalVariableDeclStmt] ... ...;
# 16| 0: [LocalVariableDeclAndInitExpr] Int32 i = ...
# 16| -1: [TypeMention] int
# 16| 0: [LocalVariableAccess] access to local variable i
# 16| 1: [IntLiteral] 0
# 21| [NamespaceDeclaration] namespace ... { ... }
# 23| 1: [Class] C1
# 23| 4: [InstanceConstructor,PrimaryConstructor] C1
#-----| 2: (Parameters)
# 23| 0: [Parameter] o
# 23| -1: [TypeMention] object
# 23| 1: [Parameter] s
# 23| -1: [TypeMention] string
# 23| 4: [BlockStmt] {...}
# 25| 5: [InstanceConstructor] C1
#-----| 2: (Parameters)
# 25| 0: [Parameter] o
# 25| -1: [TypeMention] object
# 25| 3: [ConstructorInitializer] call to constructor C1
# 25| 0: [ParameterAccess] access to parameter o
# 25| 1: [StringLiteralUtf16] "default"
# 25| 4: [BlockStmt] {...}
# 28| 2: [Class] C2
#-----| 3: (Base types)
# 28| 0: [TypeMention] C1
# 28| 4: [InstanceConstructor,PrimaryConstructor] C2
#-----| 2: (Parameters)
# 28| 0: [Parameter] o
# 28| -1: [TypeMention] object
# 28| 1: [Parameter] s
# 28| -1: [TypeMention] string
# 28| 2: [Parameter] i
# 28| -1: [TypeMention] int
# 28| 3: [ConstructorInitializer] call to constructor C1
# 28| 0: [ParameterAccess] access to parameter o
# 28| 1: [ParameterAccess] access to parameter s
# 28| 4: [BlockStmt] {...}