mirror of
https://github.com/github/codeql.git
synced 2026-04-25 00:35:20 +02:00
C#: Update PrintAST query
This commit is contained in:
@@ -32,7 +32,10 @@ private predicate shouldPrint(Element e, Location l) {
|
||||
}
|
||||
|
||||
private predicate isImplicitExpression(ControlFlowElement element) {
|
||||
element.(Expr).isImplicit() and not exists(element.getAChild())
|
||||
element.(Expr).isImplicit() and
|
||||
not element instanceof CastExpr and
|
||||
not element.(OperatorCall).getTarget() instanceof ImplicitConversionOperator and
|
||||
not element instanceof ElementInitializer
|
||||
}
|
||||
|
||||
private predicate isFilteredCompilerGenerated(Declaration d) {
|
||||
@@ -291,18 +294,6 @@ class ControlFlowElementNode extends ElementNode {
|
||||
controlFlowElement = element and
|
||||
// Removing implicit expressions
|
||||
not isImplicitExpression(element) and
|
||||
// Removing extra nodes that are generated for an `AssignOperation`
|
||||
not exists(AssignOperation ao |
|
||||
ao.hasExpandedAssignment() and
|
||||
(
|
||||
ao.getExpandedAssignment() = controlFlowElement or
|
||||
ao.getExpandedAssignment().getRValue() = controlFlowElement or
|
||||
ao.getExpandedAssignment().getRValue().(BinaryOperation).getLeftOperand() =
|
||||
controlFlowElement.getParent*() or
|
||||
ao.getExpandedAssignment().getRValue().(OperatorCall).getChild(0) =
|
||||
controlFlowElement.getParent*()
|
||||
)
|
||||
) and
|
||||
not isNotNeeded(element.getParent+()) and
|
||||
// LambdaExpr is both a Callable and a ControlFlowElement,
|
||||
// print it with the more specific CallableNode
|
||||
@@ -429,7 +420,7 @@ final class DeclarationWithAccessorsNode extends ElementNode {
|
||||
result.(ParametersNode).getParameterizable() = declaration
|
||||
or
|
||||
childIndex = 2 and
|
||||
result.(ElementNode).getElement() = declaration.(Property).getInitializer().getParent()
|
||||
result.(ElementNode).getElement() = declaration.(Property).getInitializer()
|
||||
or
|
||||
result.(ElementNode).getElement() =
|
||||
rank[childIndex - 2](Element a, string file, int line, int column, string name |
|
||||
@@ -462,12 +453,7 @@ final class FieldNode extends ElementNode {
|
||||
result.(AttributesNode).getAttributable() = field
|
||||
or
|
||||
childIndex = 1 and
|
||||
field.hasInitializer() and
|
||||
(
|
||||
if field.getDeclaringType() instanceof Enum
|
||||
then result.(ElementNode).getElement() = field.getInitializer()
|
||||
else result.(ElementNode).getElement() = field.getInitializer().getParent()
|
||||
)
|
||||
result.(ElementNode).getElement() = field.getInitializer()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -408,7 +408,7 @@ class Field extends Variable, AssignableMember, Attributable, TopLevelExprParent
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
override Expr getInitializer() { result = this.getChildExpr(0).getChildExpr(0) }
|
||||
final override Expr getInitializer() { result = this.getChildExpr(0).getChildExpr(0) }
|
||||
|
||||
/**
|
||||
* Holds if this field has an initial value. For example, the initial
|
||||
@@ -515,6 +515,4 @@ class EnumConstant extends MemberConstant {
|
||||
* ```
|
||||
*/
|
||||
predicate hasExplicitValue() { exists(this.getInitializer()) }
|
||||
|
||||
override Expr getInitializer() { result = this.getChildExpr(0) }
|
||||
}
|
||||
|
||||
@@ -67,7 +67,11 @@ class Expr extends ControlFlowElement, @expr {
|
||||
* Holds if this expression is generated by the compiler and does not appear
|
||||
* explicitly in the source code.
|
||||
*/
|
||||
predicate isImplicit() { compiler_generated(this) }
|
||||
final predicate isImplicit() {
|
||||
compiler_generated(this) or
|
||||
this =
|
||||
any(AssignOperation op).getExpandedAssignment().getRValue().getChildExpr(0).getAChildExpr+()
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets an expression that is the result of stripping (recursively) all
|
||||
|
||||
@@ -163,9 +163,7 @@ attributes.cs:
|
||||
# 67| 4: [BlockStmt] {...}
|
||||
# 70| [Enum] E
|
||||
# 70| 5: [Field] A
|
||||
# 70| 1: [AssignExpr] ... = ...
|
||||
# 70| 0: [MemberConstantAccess] access to constant A
|
||||
# 70| 1: [IntLiteral] 42
|
||||
# 70| 1: [IntLiteral] 42
|
||||
# 72| [Class] ArgsAttribute
|
||||
#-----| 3: (Base types)
|
||||
# 72| 0: [TypeMention] Attribute
|
||||
|
||||
@@ -186,14 +186,10 @@ trivia.cs:
|
||||
# 89| 4: [BlockStmt] {...}
|
||||
# 92| 7: [Field] F1
|
||||
# 92| -1: [TypeMention] int
|
||||
# 92| 1: [AssignExpr] ... = ...
|
||||
# 92| 0: [FieldAccess] access to field F1
|
||||
# 94| 1: [IntLiteral] 10
|
||||
# 94| 1: [IntLiteral] 10
|
||||
# 98| 8: [Field] F2
|
||||
# 98| -1: [TypeMention] int
|
||||
# 98| 1: [AssignExpr] ... = ...
|
||||
# 98| 0: [FieldAccess] access to field F2
|
||||
# 98| 1: [IntLiteral] 0
|
||||
# 98| 1: [IntLiteral] 0
|
||||
# 100| 9: [Property] P1
|
||||
# 100| -1: [TypeMention] int
|
||||
# 102| 3: [Getter] get_P1
|
||||
|
||||
@@ -1111,18 +1111,14 @@ StaticInterfaceMembers.cs:
|
||||
#-----| 3: (Base types)
|
||||
# 28| 4: [Property] Real
|
||||
# 28| -1: [TypeMention] double
|
||||
# 28| 2: [AssignExpr] ... = ...
|
||||
# 28| 0: [PropertyCall] access to property Real
|
||||
# 28| 1: [DoubleLiteral] 0
|
||||
# 28| 2: [DoubleLiteral] 0
|
||||
# 28| 3: [Getter] get_Real
|
||||
# 28| 4: [Setter] set_Real
|
||||
#-----| 2: (Parameters)
|
||||
# 28| 0: [Parameter] value
|
||||
# 29| 5: [Property] Imaginary
|
||||
# 29| -1: [TypeMention] double
|
||||
# 29| 2: [AssignExpr] ... = ...
|
||||
# 29| 0: [PropertyCall] access to property Imaginary
|
||||
# 29| 1: [DoubleLiteral] 0
|
||||
# 29| 2: [DoubleLiteral] 0
|
||||
# 29| 3: [Getter] get_Imaginary
|
||||
# 29| 4: [Setter] set_Imaginary
|
||||
#-----| 2: (Parameters)
|
||||
|
||||
@@ -2,9 +2,7 @@ csharp6.cs:
|
||||
# 10| [Class] TestCSharp6
|
||||
# 12| 6: [Property] Value
|
||||
# 12| -1: [TypeMention] int
|
||||
# 15| 2: [AssignExpr] ... = ...
|
||||
# 12| 0: [PropertyCall] access to property Value
|
||||
# 15| 1: [IntLiteral] 20
|
||||
# 15| 2: [IntLiteral] 20
|
||||
# 14| 3: [Getter] get_Value
|
||||
# 17| 7: [Method] Fn
|
||||
# 17| -1: [TypeMention] Void
|
||||
|
||||
@@ -35,15 +35,11 @@ csharp72.cs:
|
||||
# 44| [Class] NumericLiterals
|
||||
# 46| 5: [Field] binaryValue
|
||||
# 46| -1: [TypeMention] int
|
||||
# 46| 1: [AssignExpr] ... = ...
|
||||
# 46| 0: [FieldAccess] access to field binaryValue
|
||||
# 46| 1: [IntLiteral] 85
|
||||
# 46| 1: [IntLiteral] 85
|
||||
# 49| [Class] PrivateProtected
|
||||
# 51| 5: [Field] X
|
||||
# 51| -1: [TypeMention] int
|
||||
# 51| 1: [AssignExpr] ... = ...
|
||||
# 51| 0: [FieldAccess] access to field X
|
||||
# 51| 1: [IntLiteral] 1
|
||||
# 51| 1: [IntLiteral] 1
|
||||
# 53| 6: [Method] F
|
||||
# 53| -1: [TypeMention] Void
|
||||
# 53| 4: [BlockStmt] {...}
|
||||
|
||||
@@ -2,25 +2,17 @@ CSharp7.cs:
|
||||
# 5| [Class] Literals
|
||||
# 7| 5: [Field] x
|
||||
# 7| -1: [TypeMention] int
|
||||
# 7| 1: [AssignExpr] ... = ...
|
||||
# 7| 0: [FieldAccess] access to field x
|
||||
# 7| 1: [IntLiteral] 11
|
||||
# 7| 1: [IntLiteral] 11
|
||||
# 8| 6: [Field] y
|
||||
# 8| -1: [TypeMention] int
|
||||
# 8| 1: [AssignExpr] ... = ...
|
||||
# 8| 0: [FieldAccess] access to field y
|
||||
# 8| 1: [IntLiteral] 123456
|
||||
# 8| 1: [IntLiteral] 123456
|
||||
# 9| 7: [Field] z
|
||||
# 9| -1: [TypeMention] int
|
||||
# 9| 1: [AssignExpr] ... = ...
|
||||
# 9| 0: [FieldAccess] access to field z
|
||||
# 9| 1: [IntLiteral] 128
|
||||
# 9| 1: [IntLiteral] 128
|
||||
# 12| [Class] ExpressionBodiedMembers
|
||||
# 14| 4: [Field] field
|
||||
# 14| -1: [TypeMention] int
|
||||
# 14| 1: [AssignExpr] ... = ...
|
||||
# 14| 0: [FieldAccess] access to field field
|
||||
# 14| 1: [IntLiteral] 0
|
||||
# 14| 1: [IntLiteral] 0
|
||||
# 15| 5: [Method] Foo
|
||||
# 15| -1: [TypeMention] int
|
||||
# 15| 4: [FieldAccess] access to field field
|
||||
|
||||
@@ -2,18 +2,14 @@ AlternateInterpolatedStrings.cs:
|
||||
# 3| [Class] AlternateInterpolatedStrings
|
||||
# 5| 5: [Field] s1
|
||||
# 5| -1: [TypeMention] string
|
||||
# 5| 1: [AssignExpr] ... = ...
|
||||
# 5| 0: [FieldAccess] access to field s1
|
||||
# 5| 1: [InterpolatedStringExpr] $"..."
|
||||
# 5| 0: [StringLiteralUtf16] "C:"
|
||||
# 5| 1: [IntLiteral] 12
|
||||
# 5| 1: [InterpolatedStringExpr] $"..."
|
||||
# 5| 0: [StringLiteralUtf16] "C:"
|
||||
# 5| 1: [IntLiteral] 12
|
||||
# 6| 6: [Field] s2
|
||||
# 6| -1: [TypeMention] string
|
||||
# 6| 1: [AssignExpr] ... = ...
|
||||
# 6| 0: [FieldAccess] access to field s2
|
||||
# 6| 1: [InterpolatedStringExpr] $"..."
|
||||
# 6| 0: [StringLiteralUtf16] "C:"
|
||||
# 6| 1: [IntLiteral] 12
|
||||
# 6| 1: [InterpolatedStringExpr] $"..."
|
||||
# 6| 0: [StringLiteralUtf16] "C:"
|
||||
# 6| 1: [IntLiteral] 12
|
||||
AsyncStreams.cs:
|
||||
# 6| [Class] AsyncStreams
|
||||
# 8| 5: [Method] Items
|
||||
|
||||
@@ -3,10 +3,8 @@ AnonymousObjectCreation.cs:
|
||||
# 7| 5: [Field] l
|
||||
# 7| -1: [TypeMention] List<AnonObj>
|
||||
# 7| 1: [TypeMention] AnonObj
|
||||
# 7| 1: [AssignExpr] ... = ...
|
||||
# 7| 0: [FieldAccess] access to field l
|
||||
# 7| 1: [CastExpr] (...) ...
|
||||
# 7| 1: [ObjectCreation] object creation of type List<AnonObj>
|
||||
# 7| 1: [CastExpr] (...) ...
|
||||
# 7| 1: [ObjectCreation] object creation of type List<AnonObj>
|
||||
# 9| 6: [Property] Prop1
|
||||
# 9| -1: [TypeMention] int
|
||||
# 9| 3: [Getter] get_Prop1
|
||||
@@ -294,10 +292,8 @@ FunctionPointer.cs:
|
||||
# 5| 5: [Class] Program
|
||||
# 7| 5: [Field] pointer
|
||||
# 7| -1: [TypeMention] delegate* default<Int32>
|
||||
# 7| 1: [AssignExpr] ... = ...
|
||||
# 7| 0: [FieldAccess] access to field pointer
|
||||
# 7| 1: [AddressOfExpr] &...
|
||||
# 7| 0: [MethodAccess] access to method M0
|
||||
# 7| 1: [AddressOfExpr] &...
|
||||
# 7| 0: [MethodAccess] access to method M0
|
||||
# 9| 6: [Method] M0
|
||||
# 9| -1: [TypeMention] int
|
||||
# 10| 4: [BlockStmt] {...}
|
||||
|
||||
@@ -12,13 +12,9 @@ definitions.cs:
|
||||
# 9| 4: [BlockStmt] {...}
|
||||
# 13| 2: [Enum] Enumeration
|
||||
# 15| 5: [Field] e1
|
||||
# 15| 1: [AssignExpr] ... = ...
|
||||
# 15| 0: [MemberConstantAccess] access to constant e1
|
||||
# 15| 1: [IntLiteral] 1
|
||||
# 15| 1: [IntLiteral] 1
|
||||
# 15| 6: [Field] e2
|
||||
# 15| 1: [AssignExpr] ... = ...
|
||||
# 15| 0: [MemberConstantAccess] access to constant e2
|
||||
# 15| 1: [IntLiteral] 2
|
||||
# 15| 1: [IntLiteral] 2
|
||||
# 15| 7: [Field] e3
|
||||
# 18| 3: [Class] C1
|
||||
# 20| 4: [InstanceConstructor] C1
|
||||
@@ -405,14 +401,12 @@ definitions.cs:
|
||||
# 166| -1: [TypeMention] Nested<I4>
|
||||
# 166| 1: [TypeMention] C4
|
||||
# 166| 2: [TypeMention] I4
|
||||
# 166| 1: [AssignExpr] ... = ...
|
||||
# 166| 0: [FieldAccess] access to field f
|
||||
# 166| 1: [MethodCall] call to method Create
|
||||
# 166| -1: [TypeAccess] access to type Nested<I4>
|
||||
# 166| -2: [TypeMention] Nested<I4>
|
||||
# 166| 1: [TypeMention] I4
|
||||
# 166| -1: [TypeAccess] access to type C4
|
||||
# 166| 0: [TypeMention] C4
|
||||
# 166| 1: [MethodCall] call to method Create
|
||||
# 166| -1: [TypeAccess] access to type Nested<I4>
|
||||
# 166| -2: [TypeMention] Nested<I4>
|
||||
# 166| 1: [TypeMention] I4
|
||||
# 166| -1: [TypeAccess] access to type C4
|
||||
# 166| 0: [TypeMention] C4
|
||||
# 167| 6: [Field] c1
|
||||
# 167| -1: [TypeMention] C1
|
||||
# 169| 7: [Method] M
|
||||
|
||||
@@ -11,35 +11,25 @@ enums.cs:
|
||||
# 23| 3: [Enum] E
|
||||
# 25| 4: [Enum] ValueColor
|
||||
# 28| 5: [Field] OneRed
|
||||
# 28| 1: [AssignExpr] ... = ...
|
||||
# 28| 0: [MemberConstantAccess] access to constant OneRed
|
||||
# 28| 1: [CastExpr] (...) ...
|
||||
# 28| 1: [IntLiteral] 1
|
||||
# 28| 1: [CastExpr] (...) ...
|
||||
# 28| 1: [IntLiteral] 1
|
||||
# 29| 6: [Field] TwoGreen
|
||||
# 29| 1: [AssignExpr] ... = ...
|
||||
# 29| 0: [MemberConstantAccess] access to constant TwoGreen
|
||||
# 29| 1: [CastExpr] (...) ...
|
||||
# 29| 1: [IntLiteral] 2
|
||||
# 29| 1: [CastExpr] (...) ...
|
||||
# 29| 1: [IntLiteral] 2
|
||||
# 30| 7: [Field] FourBlue
|
||||
# 30| 1: [AssignExpr] ... = ...
|
||||
# 30| 0: [MemberConstantAccess] access to constant FourBlue
|
||||
# 30| 1: [CastExpr] (...) ...
|
||||
# 30| 1: [IntLiteral] 4
|
||||
# 30| 1: [CastExpr] (...) ...
|
||||
# 30| 1: [IntLiteral] 4
|
||||
# 34| 5: [Enum] SparseColor
|
||||
# 37| 5: [Field] Red
|
||||
# 38| 6: [Field] Green
|
||||
# 38| 1: [AssignExpr] ... = ...
|
||||
# 38| 0: [MemberConstantAccess] access to constant Green
|
||||
# 38| 1: [IntLiteral] 10
|
||||
# 38| 1: [IntLiteral] 10
|
||||
# 39| 7: [Field] Blue
|
||||
# 40| 8: [Field] AnotherBlue
|
||||
# 40| 1: [AssignExpr] ... = ...
|
||||
# 40| 0: [MemberConstantAccess] access to constant AnotherBlue
|
||||
# 40| 1: [AddExpr] ... + ...
|
||||
# 40| 0: [CastExpr] (...) ...
|
||||
# 40| 1: [MemberConstantAccess] access to constant Blue
|
||||
# 40| 1: [CastExpr] (...) ...
|
||||
# 40| 1: [MemberConstantAccess] access to constant Red
|
||||
# 40| 1: [AddExpr] ... + ...
|
||||
# 40| 0: [CastExpr] (...) ...
|
||||
# 40| 1: [MemberConstantAccess] access to constant Blue
|
||||
# 40| 1: [CastExpr] (...) ...
|
||||
# 40| 1: [MemberConstantAccess] access to constant Red
|
||||
# 44| 6: [Class] Test
|
||||
# 47| 5: [Method] Main
|
||||
# 47| -1: [TypeMention] Void
|
||||
|
||||
@@ -87,16 +87,12 @@ events.cs:
|
||||
# 50| 4: [Class] Control
|
||||
# 53| 6: [Field] mouseDownEventKey
|
||||
# 53| -1: [TypeMention] object
|
||||
# 53| 1: [AssignExpr] ... = ...
|
||||
# 53| 0: [FieldAccess] access to field mouseDownEventKey
|
||||
# 53| 1: [ObjectCreation] object creation of type Object
|
||||
# 53| 0: [TypeMention] object
|
||||
# 53| 1: [ObjectCreation] object creation of type Object
|
||||
# 53| 0: [TypeMention] object
|
||||
# 54| 7: [Field] mouseUpEventKey
|
||||
# 54| -1: [TypeMention] object
|
||||
# 54| 1: [AssignExpr] ... = ...
|
||||
# 54| 0: [FieldAccess] access to field mouseUpEventKey
|
||||
# 54| 1: [ObjectCreation] object creation of type Object
|
||||
# 54| 0: [TypeMention] object
|
||||
# 54| 1: [ObjectCreation] object creation of type Object
|
||||
# 54| 0: [TypeMention] object
|
||||
# 57| 8: [Method] GetEventHandler
|
||||
# 57| -1: [TypeMention] Delegate
|
||||
#-----| 2: (Parameters)
|
||||
|
||||
@@ -417,12 +417,10 @@ ReducedExpression.cs:
|
||||
# 2| [Class] ReducedClass
|
||||
# 5| 5: [Field] ReducedExpression
|
||||
# 5| -1: [TypeMention] int
|
||||
# 5| 1: [AssignExpr] ... = ...
|
||||
# 5| 0: [MemberConstantAccess] access to constant ReducedExpression
|
||||
# 5| 1: [ConditionalExpr] ... ? ... : ...
|
||||
# 5| 0: [BoolLiteral] true
|
||||
# 5| 1: [IntLiteral] 10
|
||||
# 5| 2: [IntLiteral] 12
|
||||
# 5| 1: [ConditionalExpr] ... ? ... : ...
|
||||
# 5| 0: [BoolLiteral] true
|
||||
# 5| 1: [IntLiteral] 10
|
||||
# 5| 2: [IntLiteral] 12
|
||||
expressions.cs:
|
||||
# 5| [NamespaceDeclaration] namespace ... { ... }
|
||||
# 7| 1: [Class] Class
|
||||
@@ -550,14 +548,10 @@ expressions.cs:
|
||||
# 41| 0: [LocalVariableAccess] access to local variable c
|
||||
# 44| 6: [Field] constant
|
||||
# 44| -1: [TypeMention] string
|
||||
# 44| 1: [AssignExpr] ... = ...
|
||||
# 44| 0: [MemberConstantAccess] access to constant constant
|
||||
# 44| 1: [StringLiteralUtf16] "constant"
|
||||
# 44| 1: [StringLiteralUtf16] "constant"
|
||||
# 45| 7: [Field] f
|
||||
# 45| -1: [TypeMention] int
|
||||
# 45| 1: [AssignExpr] ... = ...
|
||||
# 45| 0: [FieldAccess] access to field f
|
||||
# 45| 1: [IntLiteral] 0
|
||||
# 45| 1: [IntLiteral] 0
|
||||
# 46| 8: [Field] name
|
||||
# 46| -1: [TypeMention] string
|
||||
# 48| 9: [StaticConstructor] Class
|
||||
@@ -1492,16 +1486,12 @@ expressions.cs:
|
||||
# 361| 15: [Class] Rectangle2
|
||||
# 364| 5: [Field] p1
|
||||
# 364| -1: [TypeMention] Point
|
||||
# 364| 1: [AssignExpr] ... = ...
|
||||
# 364| 0: [FieldAccess] access to field p1
|
||||
# 364| 1: [ObjectCreation] object creation of type Point
|
||||
# 364| 0: [TypeMention] Point
|
||||
# 364| 1: [ObjectCreation] object creation of type Point
|
||||
# 364| 0: [TypeMention] Point
|
||||
# 365| 6: [Field] p2
|
||||
# 365| -1: [TypeMention] Point
|
||||
# 365| 1: [AssignExpr] ... = ...
|
||||
# 365| 0: [FieldAccess] access to field p2
|
||||
# 365| 1: [ObjectCreation] object creation of type Point
|
||||
# 365| 0: [TypeMention] Point
|
||||
# 365| 1: [ObjectCreation] object creation of type Point
|
||||
# 365| 0: [TypeMention] Point
|
||||
# 367| 7: [Property] P1
|
||||
# 367| -1: [TypeMention] Point
|
||||
# 367| 3: [Getter] get_P1
|
||||
@@ -1520,11 +1510,9 @@ expressions.cs:
|
||||
# 376| 6: [Field] phoneNumbers
|
||||
# 376| -1: [TypeMention] List<string>
|
||||
# 376| 1: [TypeMention] string
|
||||
# 376| 1: [AssignExpr] ... = ...
|
||||
# 376| 0: [FieldAccess] access to field phoneNumbers
|
||||
# 376| 1: [ObjectCreation] object creation of type List<String>
|
||||
# 376| 0: [TypeMention] List<string>
|
||||
# 376| 1: [TypeMention] string
|
||||
# 376| 1: [ObjectCreation] object creation of type List<String>
|
||||
# 376| 0: [TypeMention] List<string>
|
||||
# 376| 1: [TypeMention] string
|
||||
# 378| 7: [Property] Name
|
||||
# 378| -1: [TypeMention] string
|
||||
# 378| 3: [Getter] get_Name
|
||||
@@ -2194,9 +2182,8 @@ expressions.cs:
|
||||
# 495| 19: [Class] ExpressionDepth
|
||||
# 497| 5: [Field] d
|
||||
# 497| -1: [TypeMention] int
|
||||
# 497| 1: [AssignExpr] ... = ...
|
||||
# 497| 0: [MemberConstantAccess] access to constant d
|
||||
# 497| 1: [AddExpr] ... + ...
|
||||
# 497| 1: [AddExpr] ... + ...
|
||||
# 497| 0: [AddExpr] ... + ...
|
||||
# 497| 0: [AddExpr] ... + ...
|
||||
# 497| 0: [AddExpr] ... + ...
|
||||
# 497| 0: [AddExpr] ... + ...
|
||||
@@ -2274,9 +2261,7 @@ expressions.cs:
|
||||
# 497| 0: [AddExpr] ... + ...
|
||||
# 497| 0: [AddExpr] ... + ...
|
||||
# 497| 0: [AddExpr] ... + ...
|
||||
# 497| 0: [AddExpr] ... + ...
|
||||
# 497| 0: [IntLiteral] 1
|
||||
# 497| 1: [IntLiteral] 1
|
||||
# 497| 0: [IntLiteral] 1
|
||||
# 497| 1: [IntLiteral] 1
|
||||
# 497| 1: [IntLiteral] 1
|
||||
# 497| 1: [IntLiteral] 1
|
||||
@@ -2315,7 +2300,7 @@ expressions.cs:
|
||||
# 497| 1: [IntLiteral] 1
|
||||
# 497| 1: [IntLiteral] 1
|
||||
# 497| 1: [IntLiteral] 1
|
||||
# 498| 1: [IntLiteral] 1
|
||||
# 497| 1: [IntLiteral] 1
|
||||
# 498| 1: [IntLiteral] 1
|
||||
# 498| 1: [IntLiteral] 1
|
||||
# 498| 1: [IntLiteral] 1
|
||||
@@ -2355,6 +2340,7 @@ expressions.cs:
|
||||
# 498| 1: [IntLiteral] 1
|
||||
# 498| 1: [IntLiteral] 1
|
||||
# 498| 1: [IntLiteral] 1
|
||||
# 498| 1: [IntLiteral] 1
|
||||
# 501| 20: [Class] TupleExprs
|
||||
# 503| 5: [Method] Test
|
||||
# 503| -1: [TypeMention] Void
|
||||
|
||||
@@ -3,37 +3,27 @@ fields.cs:
|
||||
# 7| 1: [Class] A
|
||||
# 10| 6: [Field] X
|
||||
# 10| -1: [TypeMention] int
|
||||
# 10| 1: [AssignExpr] ... = ...
|
||||
# 10| 0: [FieldAccess] access to field X
|
||||
# 10| 1: [IntLiteral] 1
|
||||
# 10| 1: [IntLiteral] 1
|
||||
# 10| 7: [Field] Y
|
||||
# 10| -1: [TypeMention] int
|
||||
# 10| 8: [Field] Z
|
||||
# 10| -1: [TypeMention] int
|
||||
# 10| 1: [AssignExpr] ... = ...
|
||||
# 10| 0: [FieldAccess] access to field Z
|
||||
# 10| 1: [IntLiteral] 100
|
||||
# 10| 1: [IntLiteral] 100
|
||||
# 13| 2: [Class] B
|
||||
# 15| 6: [Field] X
|
||||
# 15| -1: [TypeMention] int
|
||||
# 15| 1: [AssignExpr] ... = ...
|
||||
# 15| 0: [FieldAccess] access to field X
|
||||
# 15| 1: [IntLiteral] 1
|
||||
# 15| 1: [IntLiteral] 1
|
||||
# 16| 7: [Field] Y
|
||||
# 16| -1: [TypeMention] int
|
||||
# 17| 8: [Field] Z
|
||||
# 17| -1: [TypeMention] int
|
||||
# 17| 1: [AssignExpr] ... = ...
|
||||
# 17| 0: [FieldAccess] access to field Z
|
||||
# 17| 1: [IntLiteral] 100
|
||||
# 17| 1: [IntLiteral] 100
|
||||
# 20| 3: [Class] C`1
|
||||
#-----| 1: (Type parameters)
|
||||
# 20| 0: [TypeParameter] V
|
||||
# 23| 5: [Field] count
|
||||
# 23| -1: [TypeMention] int
|
||||
# 23| 1: [AssignExpr] ... = ...
|
||||
# 23| 0: [FieldAccess] access to field count
|
||||
# 23| 1: [IntLiteral] 0
|
||||
# 23| 1: [IntLiteral] 0
|
||||
# 25| 6: [InstanceConstructor] C
|
||||
# 25| 4: [BlockStmt] {...}
|
||||
# 25| 0: [ExprStmt] ...;
|
||||
@@ -50,22 +40,16 @@ fields.cs:
|
||||
# 34| -1: [TypeMention] bool
|
||||
# 35| 7: [Field] x
|
||||
# 35| -1: [TypeMention] double
|
||||
# 35| 1: [AssignExpr] ... = ...
|
||||
# 35| 0: [FieldAccess] access to field x
|
||||
# 35| 1: [MethodCall] call to method Sqrt
|
||||
# 35| -1: [TypeAccess] access to type Math
|
||||
# 35| 0: [TypeMention] Math
|
||||
# 35| 0: [DoubleLiteral] 2
|
||||
# 35| 1: [MethodCall] call to method Sqrt
|
||||
# 35| -1: [TypeAccess] access to type Math
|
||||
# 35| 0: [TypeMention] Math
|
||||
# 35| 0: [DoubleLiteral] 2
|
||||
# 36| 8: [Field] i
|
||||
# 36| -1: [TypeMention] int
|
||||
# 36| 1: [AssignExpr] ... = ...
|
||||
# 36| 0: [FieldAccess] access to field i
|
||||
# 36| 1: [IntLiteral] 100
|
||||
# 36| 1: [IntLiteral] 100
|
||||
# 37| 9: [Field] s
|
||||
# 37| -1: [TypeMention] string
|
||||
# 37| 1: [AssignExpr] ... = ...
|
||||
# 37| 0: [FieldAccess] access to field s
|
||||
# 37| 1: [StringLiteralUtf16] "Hello"
|
||||
# 37| 1: [StringLiteralUtf16] "Hello"
|
||||
# 39| 10: [Method] Main
|
||||
# 39| -1: [TypeMention] Void
|
||||
# 40| 4: [BlockStmt] {...}
|
||||
@@ -111,28 +95,24 @@ fields.cs:
|
||||
# 50| 5: [Class] Color
|
||||
# 53| 5: [Field] Black
|
||||
# 53| -1: [TypeMention] Color
|
||||
# 53| 1: [AssignExpr] ... = ...
|
||||
# 53| 0: [FieldAccess] access to field Black
|
||||
# 53| 1: [ObjectCreation] object creation of type Color
|
||||
# 53| -1: [TypeMention] Color
|
||||
# 53| 0: [CastExpr] (...) ...
|
||||
# 53| 1: [IntLiteral] 0
|
||||
# 53| 1: [CastExpr] (...) ...
|
||||
# 53| 1: [IntLiteral] 0
|
||||
# 53| 2: [CastExpr] (...) ...
|
||||
# 53| 1: [IntLiteral] 0
|
||||
# 53| 1: [ObjectCreation] object creation of type Color
|
||||
# 53| -1: [TypeMention] Color
|
||||
# 53| 0: [CastExpr] (...) ...
|
||||
# 53| 1: [IntLiteral] 0
|
||||
# 53| 1: [CastExpr] (...) ...
|
||||
# 53| 1: [IntLiteral] 0
|
||||
# 53| 2: [CastExpr] (...) ...
|
||||
# 53| 1: [IntLiteral] 0
|
||||
# 54| 6: [Field] White
|
||||
# 54| -1: [TypeMention] Color
|
||||
# 54| 1: [AssignExpr] ... = ...
|
||||
# 54| 0: [FieldAccess] access to field White
|
||||
# 54| 1: [ObjectCreation] object creation of type Color
|
||||
# 54| -1: [TypeMention] Color
|
||||
# 54| 0: [CastExpr] (...) ...
|
||||
# 54| 1: [IntLiteral] 255
|
||||
# 54| 1: [CastExpr] (...) ...
|
||||
# 54| 1: [IntLiteral] 255
|
||||
# 54| 2: [CastExpr] (...) ...
|
||||
# 54| 1: [IntLiteral] 255
|
||||
# 54| 1: [ObjectCreation] object creation of type Color
|
||||
# 54| -1: [TypeMention] Color
|
||||
# 54| 0: [CastExpr] (...) ...
|
||||
# 54| 1: [IntLiteral] 255
|
||||
# 54| 1: [CastExpr] (...) ...
|
||||
# 54| 1: [IntLiteral] 255
|
||||
# 54| 2: [CastExpr] (...) ...
|
||||
# 54| 1: [IntLiteral] 255
|
||||
# 56| 7: [InstanceConstructor] Color
|
||||
#-----| 2: (Parameters)
|
||||
# 56| 0: [Parameter] r
|
||||
@@ -145,50 +125,38 @@ fields.cs:
|
||||
# 60| 6: [Class] TestBindings
|
||||
# 63| 6: [Field] a
|
||||
# 63| -1: [TypeMention] int
|
||||
# 63| 1: [AssignExpr] ... = ...
|
||||
# 63| 0: [FieldAccess] access to field a
|
||||
# 63| 1: [AddExpr] ... + ...
|
||||
# 63| 0: [FieldAccess] access to field b
|
||||
# 63| 1: [IntLiteral] 1
|
||||
# 63| 1: [AddExpr] ... + ...
|
||||
# 63| 0: [FieldAccess] access to field b
|
||||
# 63| 1: [IntLiteral] 1
|
||||
# 64| 7: [Field] b
|
||||
# 64| -1: [TypeMention] int
|
||||
# 64| 1: [AssignExpr] ... = ...
|
||||
# 64| 0: [FieldAccess] access to field b
|
||||
# 64| 1: [AddExpr] ... + ...
|
||||
# 64| 0: [FieldAccess] access to field a
|
||||
# 64| 1: [IntLiteral] 1
|
||||
# 64| 1: [AddExpr] ... + ...
|
||||
# 64| 0: [FieldAccess] access to field a
|
||||
# 64| 1: [IntLiteral] 1
|
||||
# 70| [NamespaceDeclaration] namespace ... { ... }
|
||||
# 72| 1: [Class] A
|
||||
# 74| 5: [Field] X
|
||||
# 74| -1: [TypeMention] int
|
||||
# 74| 1: [AssignExpr] ... = ...
|
||||
# 74| 0: [MemberConstantAccess] access to constant X
|
||||
# 74| 1: [AddExpr] ... + ...
|
||||
# 74| 0: [MemberConstantAccess] access to constant Z
|
||||
# 74| -1: [TypeAccess] access to type B
|
||||
# 74| 0: [TypeMention] B
|
||||
# 74| 1: [IntLiteral] 1
|
||||
# 74| 1: [AddExpr] ... + ...
|
||||
# 74| 0: [MemberConstantAccess] access to constant Z
|
||||
# 74| -1: [TypeAccess] access to type B
|
||||
# 74| 0: [TypeMention] B
|
||||
# 74| 1: [IntLiteral] 1
|
||||
# 75| 6: [Field] Y
|
||||
# 75| -1: [TypeMention] int
|
||||
# 75| 1: [AssignExpr] ... = ...
|
||||
# 75| 0: [MemberConstantAccess] access to constant Y
|
||||
# 75| 1: [IntLiteral] 10
|
||||
# 75| 1: [IntLiteral] 10
|
||||
# 78| 2: [Class] B
|
||||
# 80| 5: [Field] Z
|
||||
# 80| -1: [TypeMention] int
|
||||
# 80| 1: [AssignExpr] ... = ...
|
||||
# 80| 0: [MemberConstantAccess] access to constant Z
|
||||
# 80| 1: [AddExpr] ... + ...
|
||||
# 80| 0: [MemberConstantAccess] access to constant Y
|
||||
# 80| -1: [TypeAccess] access to type A
|
||||
# 80| 0: [TypeMention] A
|
||||
# 80| 1: [IntLiteral] 1
|
||||
# 80| 1: [AddExpr] ... + ...
|
||||
# 80| 0: [MemberConstantAccess] access to constant Y
|
||||
# 80| -1: [TypeAccess] access to type A
|
||||
# 80| 0: [TypeMention] A
|
||||
# 80| 1: [IntLiteral] 1
|
||||
# 83| 3: [Class] C
|
||||
# 85| 4: [Field] Foo
|
||||
# 85| -1: [TypeMention] int
|
||||
# 85| 1: [AssignExpr] ... = ...
|
||||
# 85| 0: [MemberConstantAccess] access to constant Foo
|
||||
# 85| 1: [IntLiteral] 1
|
||||
# 85| 1: [IntLiteral] 1
|
||||
# 86| 5: [Field] x
|
||||
# 86| -1: [TypeMention] long?
|
||||
# 86| 1: [TypeMention] long
|
||||
|
||||
@@ -370,24 +370,18 @@ generics.cs:
|
||||
# 60| 0: [TypeParameter] T
|
||||
# 63| 5: [Field] NumRows
|
||||
# 63| -1: [TypeMention] int
|
||||
# 63| 1: [AssignExpr] ... = ...
|
||||
# 63| 0: [MemberConstantAccess] access to constant NumRows
|
||||
# 63| 1: [IntLiteral] 26
|
||||
# 63| 1: [IntLiteral] 26
|
||||
# 64| 6: [Field] NumCols
|
||||
# 64| -1: [TypeMention] int
|
||||
# 64| 1: [AssignExpr] ... = ...
|
||||
# 64| 0: [MemberConstantAccess] access to constant NumCols
|
||||
# 64| 1: [IntLiteral] 10
|
||||
# 64| 1: [IntLiteral] 10
|
||||
# 66| 7: [Field] cells
|
||||
# 66| -1: [TypeMention] T[,]
|
||||
# 66| 1: [TypeMention] T
|
||||
# 66| 1: [AssignExpr] ... = ...
|
||||
# 66| 0: [FieldAccess] access to field cells
|
||||
# 66| 1: [ArrayCreation] array creation of type T[,]
|
||||
# 66| -1: [TypeMention] T[,]
|
||||
# 66| 1: [TypeMention] T
|
||||
# 66| 0: [MemberConstantAccess] access to constant NumRows
|
||||
# 66| 1: [MemberConstantAccess] access to constant NumCols
|
||||
# 66| 1: [ArrayCreation] array creation of type T[,]
|
||||
# 66| -1: [TypeMention] T[,]
|
||||
# 66| 1: [TypeMention] T
|
||||
# 66| 0: [MemberConstantAccess] access to constant NumRows
|
||||
# 66| 1: [MemberConstantAccess] access to constant NumCols
|
||||
# 68| 8: [Indexer] Item
|
||||
# 68| -1: [TypeMention] int
|
||||
#-----| 1: (Parameters)
|
||||
|
||||
@@ -214,24 +214,18 @@ indexers.cs:
|
||||
# 81| 3: [Class] Grid
|
||||
# 84| 5: [Field] NumRows
|
||||
# 84| -1: [TypeMention] int
|
||||
# 84| 1: [AssignExpr] ... = ...
|
||||
# 84| 0: [MemberConstantAccess] access to constant NumRows
|
||||
# 84| 1: [IntLiteral] 26
|
||||
# 84| 1: [IntLiteral] 26
|
||||
# 85| 6: [Field] NumCols
|
||||
# 85| -1: [TypeMention] int
|
||||
# 85| 1: [AssignExpr] ... = ...
|
||||
# 85| 0: [MemberConstantAccess] access to constant NumCols
|
||||
# 85| 1: [IntLiteral] 10
|
||||
# 85| 1: [IntLiteral] 10
|
||||
# 87| 7: [Field] cells
|
||||
# 87| -1: [TypeMention] Int32[,]
|
||||
# 87| 1: [TypeMention] int
|
||||
# 87| 1: [AssignExpr] ... = ...
|
||||
# 87| 0: [FieldAccess] access to field cells
|
||||
# 87| 1: [ArrayCreation] array creation of type Int32[,]
|
||||
# 87| -1: [TypeMention] Int32[,]
|
||||
# 87| 1: [TypeMention] int
|
||||
# 87| 0: [MemberConstantAccess] access to constant NumRows
|
||||
# 87| 1: [MemberConstantAccess] access to constant NumCols
|
||||
# 87| 1: [ArrayCreation] array creation of type Int32[,]
|
||||
# 87| -1: [TypeMention] Int32[,]
|
||||
# 87| 1: [TypeMention] int
|
||||
# 87| 0: [MemberConstantAccess] access to constant NumRows
|
||||
# 87| 1: [MemberConstantAccess] access to constant NumCols
|
||||
# 89| 8: [Indexer] Item
|
||||
# 89| -1: [TypeMention] int
|
||||
#-----| 1: (Parameters)
|
||||
|
||||
Reference in New Issue
Block a user