AST synthesis: Move location information into a separate predicate

This commit is contained in:
Tom Hvitved
2021-06-15 10:53:08 +02:00
parent dbf1805c8b
commit 1dde5b8ef9
4 changed files with 194 additions and 165 deletions

View File

@@ -45,6 +45,7 @@ calls/calls.rb:
# 316| getAnOperand/getLeftOperand: [LocalVariableAccess] __synth__0__1
# 316| getStmt: [LocalVariableAccess] __synth__0__1
# 316| getStmt: [AssignExpr] ... = ...
# 316| getAnOperand/getLeftOperand: [MethodCall] call to bar
# 316| getDesugared: [StmtSequence] ...
# 316| getStmt: [SetterMethodCall] call to bar=
# 316| getReceiver: [Self] self
@@ -56,8 +57,8 @@ calls/calls.rb:
# 316| getReceiver: [LocalVariableAccess] __synth__0
# 316| getAnOperand/getLeftOperand: [LocalVariableAccess] __synth__0__1
# 316| getStmt: [LocalVariableAccess] __synth__0__1
# 316| getAnOperand/getLeftOperand: [MethodCall] call to bar
# 316| getStmt: [AssignExpr] ... = ...
# 316| getAnOperand/getLeftOperand: [ElementReference] ...[...]
# 316| getDesugared: [StmtSequence] ...
# 316| getStmt: [SetterMethodCall] call to []=
# 316| getReceiver: [MethodCall] call to foo
@@ -69,7 +70,6 @@ calls/calls.rb:
# 316| getAnOperand/getLeftOperand: [LocalVariableAccess] __synth__0__1
# 316| getArgument: [IntegerLiteral] 4
# 316| getStmt: [LocalVariableAccess] __synth__0__1
# 316| getAnOperand/getLeftOperand: [ElementReference] ...[...]
# 316| getStmt: [AssignExpr] ... = ...
# 316| getAnOperand/getRightOperand: [SplatExpr] * ...
# 316| getAnOperand/getOperand: [ArrayLiteral] [...]
@@ -86,6 +86,7 @@ calls/calls.rb:
# 317| getArgument: [IntegerLiteral] 0
# 317| getReceiver: [LocalVariableAccess] __synth__0
# 317| getStmt: [AssignExpr] ... = ...
# 317| getAnOperand/getLeftOperand: [ElementReference] ...[...]
# 317| getDesugared: [StmtSequence] ...
# 317| getStmt: [SetterMethodCall] call to []=
# 317| getReceiver: [MethodCall] call to foo
@@ -99,7 +100,6 @@ calls/calls.rb:
# 317| getAnOperand/getLeftOperand: [LocalVariableAccess] __synth__0__1
# 317| getArgument: [IntegerLiteral] 5
# 317| getStmt: [LocalVariableAccess] __synth__0__1
# 317| getAnOperand/getLeftOperand: [ElementReference] ...[...]
# 317| getStmt: [AssignExpr] ... = ...
# 317| getAnOperand/getRightOperand: [SplatExpr] * ...
# 317| getAnOperand/getOperand: [ArrayLiteral] [...]

View File

@@ -881,9 +881,6 @@ cfg.rb:
# 62| ...
#-----| -> pattern
# 62| ...
#-----| -> ...
# 62| x
#-----| -> __synth__0
@@ -905,6 +902,9 @@ cfg.rb:
# 62| 1
#-----| -> call to []
# 62| ...
#-----| -> ...
# 62| __synth__0
#-----| -> 1
@@ -2491,9 +2491,6 @@ desugar.rb:
# 22| 0
#-----| -> call to []
# 22| ...
#-----| -> ...
# 22| __synth__0
#-----| -> 0
@@ -2530,6 +2527,9 @@ desugar.rb:
# 22| -1
#-----| -> call to []
# 22| ...
#-----| -> ...
# 22| __synth__0
#-----| -> -1
@@ -2595,9 +2595,6 @@ desugar.rb:
# 26| 0
#-----| -> call to []
# 26| ...
#-----| -> ...
# 26| __synth__0
#-----| -> 0
@@ -2607,6 +2604,9 @@ desugar.rb:
# 26| 1
#-----| -> call to []
# 26| ...
#-----| -> ...
# 26| __synth__0
#-----| -> 1