Skip to content

Commit 0ef7bee

Browse files
committed
C#: Accept PrintAst index shift.
1 parent 8ec661d commit 0ef7bee

File tree

40 files changed

+962
-962
lines changed

40 files changed

+962
-962
lines changed

csharp/ql/test/library-tests/arguments/PrintAst.expected

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
arguments.cs:
22
# 4| [Class] ArgumentsTest
3-
# 6| 4: [InstanceConstructor] ArgumentsTest
3+
# 6| 5: [InstanceConstructor] ArgumentsTest
44
#-----| 2: (Parameters)
55
# 6| 0: [Parameter] x
66
# 6| -1: [TypeMention] int
@@ -9,7 +9,7 @@ arguments.cs:
99
# 6| -1: [TypeMention] int
1010
# 6| 1: [IntLiteral] 0
1111
# 7| 4: [BlockStmt] {...}
12-
# 10| 5: [InstanceConstructor] ArgumentsTest
12+
# 10| 6: [InstanceConstructor] ArgumentsTest
1313
#-----| 2: (Parameters)
1414
# 10| 0: [Parameter] x
1515
# 10| -1: [TypeMention] int
@@ -22,7 +22,7 @@ arguments.cs:
2222
# 12| 0: [AssignExpr] ... = ...
2323
# 12| 0: [ParameterAccess] access to parameter y
2424
# 12| 1: [ParameterAccess] access to parameter x
25-
# 15| 6: [Method] f1
25+
# 15| 7: [Method] f1
2626
# 15| -1: [TypeMention] Void
2727
#-----| 2: (Parameters)
2828
# 15| 0: [Parameter] x
@@ -32,7 +32,7 @@ arguments.cs:
3232
# 15| -1: [TypeMention] int
3333
# 15| 1: [IntLiteral] 2
3434
# 16| 4: [BlockStmt] {...}
35-
# 19| 7: [Method] f2
35+
# 19| 8: [Method] f2
3636
# 19| -1: [TypeMention] Void
3737
#-----| 2: (Parameters)
3838
# 19| 0: [Parameter] x
@@ -46,7 +46,7 @@ arguments.cs:
4646
# 21| 0: [AssignExpr] ... = ...
4747
# 21| 0: [ParameterAccess] access to parameter y
4848
# 21| 1: [ParameterAccess] access to parameter x
49-
# 24| 8: [Method] f
49+
# 24| 9: [Method] f
5050
# 24| -1: [TypeMention] Void
5151
# 25| 4: [BlockStmt] {...}
5252
# 26| 0: [LocalVariableDeclStmt] ... ...;
@@ -73,7 +73,7 @@ arguments.cs:
7373
# 31| -1: [TypeMention] ArgumentsTest
7474
# 31| 0: [IntLiteral] 10
7575
# 31| 1: [IntLiteral] 5
76-
# 34| 9: [Method] f3
76+
# 34| 10: [Method] f3
7777
# 34| -1: [TypeMention] Void
7878
#-----| 2: (Parameters)
7979
# 34| 0: [Parameter] o
@@ -135,7 +135,7 @@ arguments.cs:
135135
# 43| 1: [LocalVariableAccess] access to local variable s1
136136
# 43| 2: [CastExpr] (...) ...
137137
# 43| 1: [LocalVariableAccess] access to local variable s2
138-
# 46| 10: [Method] f4
138+
# 46| 11: [Method] f4
139139
# 46| -1: [TypeMention] Void
140140
#-----| 2: (Parameters)
141141
# 46| 0: [Parameter] args
@@ -150,13 +150,13 @@ arguments.cs:
150150
# 48| -1: [ArrayInitializer] { ..., ... }
151151
# 48| 0: [NullLiteral] null
152152
# 48| 1: [NullLiteral] null
153-
# 51| 11: [Property] Prop
153+
# 51| 12: [Property] Prop
154154
# 51| -1: [TypeMention] int
155155
# 51| 3: [Getter] get_Prop
156156
# 51| 4: [Setter] set_Prop
157157
#-----| 2: (Parameters)
158158
# 51| 0: [Parameter] value
159-
# 53| 12: [Indexer] Item
159+
# 53| 13: [Indexer] Item
160160
# 53| -1: [TypeMention] int
161161
#-----| 1: (Parameters)
162162
# 53| 0: [Parameter] a
@@ -176,7 +176,7 @@ arguments.cs:
176176
# 53| 1: [Parameter] b
177177
# 53| 2: [Parameter] value
178178
# 53| 4: [BlockStmt] {...}
179-
# 55| 13: [Method] f5
179+
# 55| 14: [Method] f5
180180
# 55| -1: [TypeMention] Void
181181
# 56| 4: [BlockStmt] {...}
182182
# 57| 0: [ExprStmt] ...;
@@ -237,14 +237,14 @@ arguments.cs:
237237
# 65| 0: [IntLiteral] 15
238238
# 65| 1: [IntLiteral] 16
239239
# 65| 1: [LocalVariableAccess] access to local variable tuple
240-
# 69| 14: [Method] f6
240+
# 69| 15: [Method] f6
241241
# 69| -1: [TypeMention] Void
242242
#-----| 0: (Attributes)
243243
# 68| 1: [DefaultAttribute] [My(...)]
244244
# 68| -1: [TypeMention] MyAttribute
245245
# 68| 0: [BoolLiteral] false
246246
# 69| 4: [BlockStmt] {...}
247-
# 72| 15: [Method] f7
247+
# 72| 16: [Method] f7
248248
# 72| -1: [TypeMention] Void
249249
#-----| 0: (Attributes)
250250
# 71| 1: [DefaultAttribute] [My(...)]
@@ -253,7 +253,7 @@ arguments.cs:
253253
# 71| 1: [StringLiteralUtf16] ""
254254
# 71| 2: [IntLiteral] 0
255255
# 72| 4: [BlockStmt] {...}
256-
# 74| 17: [Method] f8`1
256+
# 74| 18: [Method] f8`1
257257
# 74| -1: [TypeMention] Void
258258
#-----| 1: (Type parameters)
259259
# 74| 0: [TypeParameter] T
@@ -337,7 +337,7 @@ arguments.cs:
337337
# 86| 1: [IntLiteral] 1
338338
# 86| 1: [CastExpr] (...) ...
339339
# 86| 1: [IntLiteral] 2
340-
# 89| 19: [Method] f9`1
340+
# 89| 20: [Method] f9`1
341341
# 89| -1: [TypeMention] Void
342342
#-----| 1: (Type parameters)
343343
# 89| 0: [TypeParameter] T
@@ -406,7 +406,7 @@ arguments.cs:
406406
# 100| 1: [ElementInitializer] call to method Add
407407
# 100| 0: [CastExpr] (...) ...
408408
# 100| 1: [IntLiteral] 2
409-
# 103| 20: [Method] f10
409+
# 103| 21: [Method] f10
410410
# 103| -1: [TypeMention] Void
411411
#-----| 2: (Parameters)
412412
# 103| 0: [Parameter] o
@@ -465,22 +465,22 @@ arguments.cs:
465465
# 116| [Class] MyAttribute
466466
#-----| 3: (Base types)
467467
# 116| 0: [TypeMention] Attribute
468-
# 118| 4: [Field] x
468+
# 118| 5: [Field] x
469469
# 118| -1: [TypeMention] int
470-
# 119| 5: [Property] y
470+
# 119| 6: [Property] y
471471
# 119| -1: [TypeMention] string
472472
# 119| 3: [Getter] get_y
473473
# 119| 4: [Setter] set_y
474474
#-----| 2: (Parameters)
475475
# 119| 0: [Parameter] value
476-
# 120| 6: [InstanceConstructor] MyAttribute
476+
# 120| 7: [InstanceConstructor] MyAttribute
477477
#-----| 2: (Parameters)
478478
# 120| 0: [Parameter] b
479479
# 120| -1: [TypeMention] bool
480480
# 120| 4: [BlockStmt] {...}
481481
lambdas.cs:
482482
# 3| [Class] LambdaArgumentsTest
483-
# 5| 5: [Method] M1
483+
# 5| 6: [Method] M1
484484
# 5| -1: [TypeMention] Void
485485
# 6| 4: [BlockStmt] {...}
486486
# 7| 0: [LocalVariableDeclStmt] ... ...;
@@ -546,13 +546,13 @@ lambdas.cs:
546546
# 17| 0: [IntLiteral] 7
547547
# 17| 1: [IntLiteral] 8
548548
# 17| 2: [IntLiteral] 9
549-
# 20| 6: [DelegateType] MyDelegate
549+
# 20| 7: [DelegateType] MyDelegate
550550
#-----| 2: (Parameters)
551551
# 20| 0: [Parameter] x
552552
# 20| -1: [TypeMention] int
553553
# 20| 1: [Parameter] y
554554
# 20| -1: [TypeMention] int
555-
# 22| 7: [Method] M2
555+
# 22| 8: [Method] M2
556556
# 22| -1: [TypeMention] Void
557557
# 23| 4: [BlockStmt] {...}
558558
# 24| 0: [LocalVariableDeclStmt] ... ...;

csharp/ql/test/library-tests/assignments/PrintAst.expected

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Assignments.cs:
22
# 1| [Class] Assignments
3-
# 3| 5: [Method] M
3+
# 3| 6: [Method] M
44
# 3| -1: [TypeMention] Void
55
# 4| 4: [BlockStmt] {...}
66
# 5| 0: [LocalVariableDeclStmt] ... ...;
@@ -40,7 +40,7 @@ Assignments.cs:
4040
# 14| 0: [Parameter] sender
4141
# 14| 1: [Parameter] e
4242
# 14| 4: [BlockStmt] {...}
43-
# 17| 6: [AddOperator] +
43+
# 17| 7: [AddOperator] +
4444
# 17| -1: [TypeMention] Assignments
4545
#-----| 2: (Parameters)
4646
# 17| 0: [Parameter] x
@@ -50,13 +50,13 @@ Assignments.cs:
5050
# 18| 4: [BlockStmt] {...}
5151
# 19| 0: [ReturnStmt] return ...;
5252
# 19| 0: [ParameterAccess] access to parameter x
53-
# 22| 7: [DelegateType] EventHandler
53+
# 22| 8: [DelegateType] EventHandler
5454
#-----| 2: (Parameters)
5555
# 22| 0: [Parameter] sender
5656
# 22| -1: [TypeMention] object
5757
# 22| 1: [Parameter] e
5858
# 22| -1: [TypeMention] object
59-
# 23| 8: [Event] Event
59+
# 23| 9: [Event] Event
6060
# 23| -1: [TypeMention] EventHandler
6161
# 23| 3: [AddEventAccessor] add_Event
6262
#-----| 2: (Parameters)

0 commit comments

Comments
 (0)