C#: Print full name of type mentions in AST

This commit is contained in:
Tamas Vajk
2020-10-14 23:17:52 +02:00
parent 7929d8a982
commit dad5166bca
34 changed files with 1101 additions and 1071 deletions

View File

@@ -1,7 +1,7 @@
csharp6.cs:
# 10| [Class] TestCSharp6
# 12| 6: [Property] Value
# 12| -1: [TypeMention] Int32
# 12| -1: [TypeMention] int
# 15| 2: [AssignExpr] ... = ...
# 12| 0: [PropertyCall] access to property Value
# 15| 1: [IntLiteral] 20
@@ -10,7 +10,7 @@ csharp6.cs:
# 17| -1: [TypeMention] Void
#-----| 2: (Parameters)
# 17| 0: [Parameter] x
# 17| -1: [TypeMention] String
# 17| -1: [TypeMention] string
# 17| 4: [MethodCall] call to method WriteLine
# 17| 0: [ParameterAccess] access to parameter x
# 19| 8: [Method] Main
@@ -20,13 +20,13 @@ csharp6.cs:
# 22| 0: [BlockStmt] {...}
# 23| 0: [LocalVariableDeclStmt] ... ...;
# 23| 0: [LocalVariableDeclAndInitExpr] String foo = ...
# 23| -1: [TypeMention] String
# 23| -1: [TypeMention] string
# 23| 0: [LocalVariableAccess] access to local variable foo
# 23| 1: [NameOfExpr] nameof(...)
# 23| 0: [TypeAccess] access to type TestCSharp6
# 23| 0: [TypeMention] TestCSharp6
# 23| 1: [LocalVariableDeclAndInitExpr] String bar = ...
# 23| -1: [TypeMention] String
# 23| -1: [TypeMention] string
# 23| 0: [LocalVariableAccess] access to local variable bar
# 23| 1: [NullLiteral] null
# 25| 1: [ExprStmt] ...;
@@ -61,14 +61,14 @@ csharp6.cs:
# 27| 1: [IntLiteral] 0
# 29| 3: [LocalVariableDeclStmt] ... ...;
# 29| 0: [LocalVariableDeclAndInitExpr] Nullable<Boolean> anythingInBar = ...
# 29| -1: [TypeMention] Nullable<Boolean>
# 29| 1: [TypeMention] Boolean
# 29| -1: [TypeMention] bool?
# 29| 1: [TypeMention] bool
# 29| 0: [LocalVariableAccess] access to local variable anythingInBar
# 29| 1: [MethodCall] call to method Any
# 29| -1: [LocalVariableAccess] access to local variable bar
# 30| 4: [LocalVariableDeclStmt] ... ...;
# 30| 0: [LocalVariableDeclAndInitExpr] Nullable<Int32> countTInFoo = ...
# 30| -1: [TypeMention] Nullable<Int32>
# 30| -1: [TypeMention] int?
# 30| 0: [LocalVariableAccess] access to local variable countTInFoo
# 30| 1: [MethodCall] call to method Count
# 30| -1: [MethodCall] call to method Select
@@ -84,14 +84,14 @@ csharp6.cs:
# 30| 1: [CharLiteral] T
# 32| 5: [LocalVariableDeclStmt] ... ...;
# 32| 0: [LocalVariableDeclAndInitExpr] Nullable<Char> testElementBinding = ...
# 32| -1: [TypeMention] Nullable<Char>
# 32| -1: [TypeMention] char?
# 32| 0: [LocalVariableAccess] access to local variable testElementBinding
# 32| 1: [IndexerCall] access to indexer
# 32| -1: [IndexerCall] access to indexer
# 32| -1: [ObjectCreation] object creation of type Dictionary<Int32,String>
# 32| 0: [TypeMention] Dictionary<Int32,String>
# 32| 1: [TypeMention] Int32
# 32| 2: [TypeMention] String
# 32| 0: [TypeMention] Dictionary<Int32, String>
# 32| 1: [TypeMention] int
# 32| 2: [TypeMention] string
# 32| 0: [IntLiteral] 2
# 32| 0: [IntLiteral] 1
# 34| 1: [SpecificCatchClause] catch (...) {...}
@@ -107,7 +107,7 @@ csharp6.cs:
# 40| 3: [GeneralCatchClause] catch {...}
# 41| 1: [BlockStmt] {...}
# 45| 9: [EQOperator] ==
# 45| -1: [TypeMention] Boolean
# 45| -1: [TypeMention] bool
#-----| 2: (Parameters)
# 45| 0: [Parameter] t1
# 45| -1: [TypeMention] TestCSharp6
@@ -115,7 +115,7 @@ csharp6.cs:
# 45| -1: [TypeMention] TestCSharp6
# 45| 4: [BoolLiteral] true
# 46| 10: [NEOperator] !=
# 46| -1: [TypeMention] Boolean
# 46| -1: [TypeMention] bool
#-----| 2: (Parameters)
# 46| 0: [Parameter] t1
# 46| -1: [TypeMention] TestCSharp6
@@ -123,14 +123,14 @@ csharp6.cs:
# 46| -1: [TypeMention] TestCSharp6
# 46| 4: [BoolLiteral] false
# 48| 11: [Property] ExprProperty
# 48| -1: [TypeMention] Int32
# 48| -1: [TypeMention] int
# 48| 3: [Getter] get_ExprProperty
# 48| 4: [IntLiteral] 3
# 50| 12: [Indexer] Item
# 50| -1: [TypeMention] Int32
# 50| -1: [TypeMention] int
#-----| 1: (Parameters)
# 50| 0: [Parameter] i
# 50| -1: [TypeMention] Int32
# 50| -1: [TypeMention] int
# 50| 3: [Getter] get_Item
#-----| 2: (Parameters)
# 50| 0: [Parameter] i
@@ -138,33 +138,33 @@ csharp6.cs:
# 53| [Class] IndexInitializers
# 55| 5: [Class] Compound
# 57| 5: [Field] DictionaryField
# 57| -1: [TypeMention] Dictionary<Int32,String>
# 57| 1: [TypeMention] Int32
# 57| 2: [TypeMention] String
# 57| -1: [TypeMention] Dictionary<Int32, String>
# 57| 1: [TypeMention] int
# 57| 2: [TypeMention] string
# 58| 6: [IndexerProperty] DictionaryProperty
# 58| -1: [TypeMention] Dictionary<Int32,String>
# 58| 1: [TypeMention] Int32
# 58| 2: [TypeMention] String
# 58| -1: [TypeMention] Dictionary<Int32, String>
# 58| 1: [TypeMention] int
# 58| 2: [TypeMention] string
# 58| 3: [Getter] get_DictionaryProperty
# 58| 4: [Setter] set_DictionaryProperty
#-----| 2: (Parameters)
# 58| 0: [Parameter] value
# 59| 7: [Field] ArrayField
# 59| -1: [TypeMention] String[]
# 59| 1: [TypeMention] String
# 59| 1: [TypeMention] string
# 60| 8: [Property] ArrayProperty
# 60| -1: [TypeMention] String[]
# 60| 1: [TypeMention] String
# 60| 1: [TypeMention] string
# 60| 3: [Getter] get_ArrayProperty
# 60| 4: [Setter] set_ArrayProperty
#-----| 2: (Parameters)
# 60| 0: [Parameter] value
# 61| 9: [Field] ArrayField2
# 61| -1: [TypeMention] String[,]
# 61| 1: [TypeMention] String
# 61| 1: [TypeMention] string
# 62| 10: [Property] ArrayProperty2
# 62| -1: [TypeMention] String[,]
# 62| 1: [TypeMention] String
# 62| 1: [TypeMention] string
# 62| 3: [Getter] get_ArrayProperty2
# 62| 4: [Setter] set_ArrayProperty2
#-----| 2: (Parameters)
@@ -174,12 +174,12 @@ csharp6.cs:
# 66| 4: [BlockStmt] {...}
# 68| 0: [LocalVariableDeclStmt] ... ...;
# 68| 0: [LocalVariableDeclAndInitExpr] Dictionary<Int32,String> dict = ...
# 68| -1: [TypeMention] Dictionary<Int32,String>
# 68| -1: [TypeMention] Dictionary<Int32, String>
# 68| 0: [LocalVariableAccess] access to local variable dict
# 68| 1: [ObjectCreation] object creation of type Dictionary<Int32,String>
# 68| -2: [TypeMention] Dictionary<Int32,String>
# 68| 1: [TypeMention] Int32
# 68| 2: [TypeMention] String
# 68| -2: [TypeMention] Dictionary<Int32, String>
# 68| 1: [TypeMention] int
# 68| 2: [TypeMention] string
# 68| -1: [ObjectInitializer] { ..., ... }
# 68| 0: [MemberInitializer] ... = ...
# 68| 0: [IndexerCall] access to indexer