diff --git a/ql/src/codeql_ruby/AST.qll b/ql/src/codeql_ruby/AST.qll index 26b37c2d192..0301de54ff4 100644 --- a/ql/src/codeql_ruby/AST.qll +++ b/ql/src/codeql_ruby/AST.qll @@ -51,7 +51,7 @@ class AstNode extends TAstNode { string toString() { none() } /** Gets the location of this node. */ - Location getLocation() { result = toGeneratedInclSynth(this).getLocation() } + Location getLocation() { result = getLocation(this) } /** Gets a child node of this `AstNode`. */ final AstNode getAChild() { result = this.getAChild(_) } diff --git a/ql/src/codeql_ruby/ast/internal/AST.qll b/ql/src/codeql_ruby/ast/internal/AST.qll index 7af573dad0d..52d79590e7a 100644 --- a/ql/src/codeql_ruby/ast/internal/AST.qll +++ b/ql/src/codeql_ruby/ast/internal/AST.qll @@ -18,7 +18,7 @@ module MethodName { } private predicate mkSynthChild(SynthKind kind, AST::AstNode parent, int i) { - any(Synthesis s).child(parent, i, SynthChild(kind)) + any(Synthesis s).child(parent, i, SynthChild(kind), _) } cached @@ -504,7 +504,7 @@ private module Cached { predicate synthChild(AST::AstNode parent, int i, AST::AstNode child) { child = getSynthChild(parent, i) or - any(Synthesis s).child(parent, i, RealChild(child)) + any(Synthesis s).child(parent, i, RealChild(child), _) } /** @@ -521,6 +521,21 @@ private module Cached { result = toGeneratedInclSynth(parent) ) } + + private Location synthLocation(AST::AstNode n) { + exists(Synthesis s, AST::AstNode parent, int i | + s.child(parent, i, _, SomeLocation(result)) and + n = getSynthChild(parent, i) + ) + } + + cached + Location getLocation(AST::AstNode n) { + result = synthLocation(n) + or + not exists(synthLocation(n)) and + result = toGeneratedInclSynth(n).getLocation() + } } import Cached diff --git a/ql/src/codeql_ruby/ast/internal/Synthesis.qll b/ql/src/codeql_ruby/ast/internal/Synthesis.qll index 521bd3d430a..60e64765391 100644 --- a/ql/src/codeql_ruby/ast/internal/Synthesis.qll +++ b/ql/src/codeql_ruby/ast/internal/Synthesis.qll @@ -39,6 +39,10 @@ newtype Child = SynthChild(SynthKind k) or RealChild(AstNode n) +newtype LocationOption = + NoneLocation() or + SomeLocation(Location l) + private newtype TSynthesis = MkSynthesis() /** A class used for synthesizing AST nodes. */ @@ -49,8 +53,10 @@ class Synthesis extends TSynthesis { * * `i = -1` is used to represent that the synthesized node is a desugared version * of its parent. + * + * In case a new node is synthesized, it will have the location specified by `l`. */ - predicate child(AstNode parent, int i, Child child) { none() } + predicate child(AstNode parent, int i, Child child, LocationOption l) { none() } /** * Holds if a local variable, identified by `i`, should be synthesized for AST @@ -66,17 +72,22 @@ class Synthesis extends TSynthesis { final string toString() { none() } } +private SomeLocation getSomeLocation(AstNode n) { + result = SomeLocation(toGenerated(n).getLocation()) +} + private module ImplicitSelfSynthesis { private class IdentifierMethodCallSelfSynthesis extends Synthesis { - final override predicate child(AstNode parent, int i, Child child) { + final override predicate child(AstNode parent, int i, Child child, LocationOption l) { child = SynthChild(SelfKind()) and parent = TIdentifierMethodCall(_) and - i = 0 + i = 0 and + l = NoneLocation() } } private class RegularMethodCallSelfSynthesis extends Synthesis { - final override predicate child(AstNode parent, int i, Child child) { + final override predicate child(AstNode parent, int i, Child child, LocationOption l) { child = SynthChild(SelfKind()) and i = 0 and exists(Generated::AstNode g | @@ -86,7 +97,8 @@ private module ImplicitSelfSynthesis { // not valid Ruby. not exists(g.(Generated::Call).getReceiver()) and not exists(g.(Generated::Call).getMethod().(Generated::ScopeResolution).getScope()) - ) + ) and + l = NoneLocation() } } } @@ -123,6 +135,15 @@ private module AssignOperationDesugar { ao instanceof AssignBitwiseXorExpr and result = BitwiseXorExprKind() } + private Location getAssignOperationLocation(AssignOperation ao) { + exists(Generated::OperatorAssignment g, Generated::Token op | + g = toGenerated(ao) and + op.getParent() = g and + op.getParentIndex() = 1 and + result = op.getLocation() + ) + } + /** * ```rb * x += y @@ -137,22 +158,25 @@ private module AssignOperationDesugar { * when `x` is a variable. */ private class VariableAssignOperationSynthesis extends Synthesis { - final override predicate child(AstNode parent, int i, Child child) { + final override predicate child(AstNode parent, int i, Child child, LocationOption l) { exists(AssignOperation ao, VariableReal v | v = ao.getLeftOperand().(VariableAccessReal).getVariableReal() | parent = ao and i = -1 and - child = SynthChild(AssignExprKind()) + child = SynthChild(AssignExprKind()) and + l = NoneLocation() or exists(AstNode assign | assign = getSynthChild(ao, -1) | parent = assign and i = 0 and - child = RealChild(ao.getLeftOperand()) + child = RealChild(ao.getLeftOperand()) and + l = NoneLocation() or parent = assign and i = 1 and - child = SynthChild(getKind(ao)) + child = SynthChild(getKind(ao)) and + l = SomeLocation(getAssignOperationLocation(ao)) or parent = getSynthChild(assign, 1) and ( @@ -161,10 +185,12 @@ private module AssignOperationDesugar { SynthChild([ LocalVariableAccessRealKind(v).(SynthKind), InstanceVariableAccessKind(v), ClassVariableAccessKind(v), GlobalVariableAccessKind(v) - ]) + ]) and + l = getSomeLocation(ao.getLeftOperand()) or i = 1 and - child = RealChild(ao.getRightOperand()) + child = RealChild(ao.getRightOperand()) and + l = NoneLocation() ) ) ) diff --git a/ql/test/library-tests/ast/operations/assignment.expected b/ql/test/library-tests/ast/operations/assignment.expected index e1a72d00e19..4110fdf52c1 100644 --- a/ql/test/library-tests/ast/operations/assignment.expected +++ b/ql/test/library-tests/ast/operations/assignment.expected @@ -18,40 +18,40 @@ assignments | operations.rb:19:1:19:5 | ... = ... | = | operations.rb:19:1:19:1 | y | operations.rb:19:5:19:5 | 0 | AssignExpr | | operations.rb:20:1:20:5 | ... = ... | = | operations.rb:20:1:20:1 | z | operations.rb:20:5:20:5 | 0 | AssignExpr | | operations.rb:68:1:68:8 | ... += ... | += | operations.rb:68:1:68:1 | x | operations.rb:68:6:68:8 | 128 | AssignAddExpr | -| operations.rb:68:1:68:8 | ... = ... | = | operations.rb:68:1:68:1 | x | operations.rb:68:1:68:8 | ... + ... | AssignExpr | +| operations.rb:68:1:68:8 | ... = ... | = | operations.rb:68:1:68:1 | x | operations.rb:68:3:68:4 | ... + ... | AssignExpr | | operations.rb:69:1:69:7 | ... -= ... | -= | operations.rb:69:1:69:1 | y | operations.rb:69:6:69:7 | 32 | AssignSubExpr | -| operations.rb:69:1:69:7 | ... = ... | = | operations.rb:69:1:69:1 | y | operations.rb:69:1:69:7 | ... - ... | AssignExpr | +| operations.rb:69:1:69:7 | ... = ... | = | operations.rb:69:1:69:1 | y | operations.rb:69:3:69:4 | ... - ... | AssignExpr | | operations.rb:70:1:70:7 | ... *= ... | *= | operations.rb:70:1:70:1 | a | operations.rb:70:6:70:7 | 12 | AssignMulExpr | -| operations.rb:70:1:70:7 | ... = ... | = | operations.rb:70:1:70:1 | a | operations.rb:70:1:70:7 | ... * ... | AssignExpr | +| operations.rb:70:1:70:7 | ... = ... | = | operations.rb:70:1:70:1 | a | operations.rb:70:3:70:4 | ... * ... | AssignExpr | | operations.rb:71:1:71:6 | ... /= ... | /= | operations.rb:71:1:71:1 | b | operations.rb:71:6:71:6 | 4 | AssignDivExpr | -| operations.rb:71:1:71:6 | ... = ... | = | operations.rb:71:1:71:1 | b | operations.rb:71:1:71:6 | ... / ... | AssignExpr | +| operations.rb:71:1:71:6 | ... = ... | = | operations.rb:71:1:71:1 | b | operations.rb:71:3:71:4 | ... / ... | AssignExpr | | operations.rb:72:1:72:6 | ... %= ... | %= | operations.rb:72:1:72:1 | z | operations.rb:72:6:72:6 | 2 | AssignModuloExpr | -| operations.rb:72:1:72:6 | ... = ... | = | operations.rb:72:1:72:1 | z | operations.rb:72:1:72:6 | ... % ... | AssignExpr | +| operations.rb:72:1:72:6 | ... = ... | = | operations.rb:72:1:72:1 | z | operations.rb:72:3:72:4 | ... % ... | AssignExpr | | operations.rb:73:1:73:11 | ... **= ... | **= | operations.rb:73:1:73:3 | foo | operations.rb:73:9:73:11 | bar | AssignExponentExpr | -| operations.rb:73:1:73:11 | ... = ... | = | operations.rb:73:1:73:3 | foo | operations.rb:73:1:73:11 | ... ** ... | AssignExpr | +| operations.rb:73:1:73:11 | ... = ... | = | operations.rb:73:1:73:3 | foo | operations.rb:73:5:73:7 | ... ** ... | AssignExpr | | operations.rb:76:2:76:8 | ... &&= ... | &&= | operations.rb:76:2:76:2 | x | operations.rb:76:8:76:8 | y | AssignLogicalAndExpr | -| operations.rb:76:2:76:8 | ... = ... | = | operations.rb:76:2:76:2 | x | operations.rb:76:2:76:8 | ... && ... | AssignExpr | -| operations.rb:77:2:77:8 | ... = ... | = | operations.rb:77:2:77:2 | a | operations.rb:77:2:77:8 | ... \|\| ... | AssignExpr | +| operations.rb:76:2:76:8 | ... = ... | = | operations.rb:76:2:76:2 | x | operations.rb:76:4:76:6 | ... && ... | AssignExpr | +| operations.rb:77:2:77:8 | ... = ... | = | operations.rb:77:2:77:2 | a | operations.rb:77:4:77:6 | ... \|\| ... | AssignExpr | | operations.rb:77:2:77:8 | ... \|\|= ... | \|\|= | operations.rb:77:2:77:2 | a | operations.rb:77:8:77:8 | b | AssignLogicalOrExpr | | operations.rb:80:2:80:8 | ... <<= ... | <<= | operations.rb:80:2:80:2 | x | operations.rb:80:8:80:8 | 2 | AssignLShiftExpr | -| operations.rb:80:2:80:8 | ... = ... | = | operations.rb:80:2:80:2 | x | operations.rb:80:2:80:8 | ... << ... | AssignExpr | -| operations.rb:81:2:81:8 | ... = ... | = | operations.rb:81:2:81:2 | y | operations.rb:81:2:81:8 | ... >> ... | AssignExpr | +| operations.rb:80:2:80:8 | ... = ... | = | operations.rb:80:2:80:2 | x | operations.rb:80:4:80:6 | ... << ... | AssignExpr | +| operations.rb:81:2:81:8 | ... = ... | = | operations.rb:81:2:81:2 | y | operations.rb:81:4:81:6 | ... >> ... | AssignExpr | | operations.rb:81:2:81:8 | ... >>= ... | >>= | operations.rb:81:2:81:2 | y | operations.rb:81:8:81:8 | 3 | AssignRShiftExpr | | operations.rb:82:2:82:12 | ... &= ... | &= | operations.rb:82:2:82:4 | foo | operations.rb:82:9:82:12 | mask | AssignBitwiseAndExpr | -| operations.rb:82:2:82:12 | ... = ... | = | operations.rb:82:2:82:4 | foo | operations.rb:82:2:82:12 | ... & ... | AssignExpr | -| operations.rb:83:2:83:12 | ... = ... | = | operations.rb:83:2:83:4 | bar | operations.rb:83:2:83:12 | ... \| ... | AssignExpr | +| operations.rb:82:2:82:12 | ... = ... | = | operations.rb:82:2:82:4 | foo | operations.rb:82:6:82:7 | ... & ... | AssignExpr | +| operations.rb:83:2:83:12 | ... = ... | = | operations.rb:83:2:83:4 | bar | operations.rb:83:6:83:7 | ... \| ... | AssignExpr | | operations.rb:83:2:83:12 | ... \|= ... | \|= | operations.rb:83:2:83:4 | bar | operations.rb:83:9:83:12 | 0x01 | AssignBitwiseOrExpr | -| operations.rb:84:2:84:11 | ... = ... | = | operations.rb:84:2:84:4 | baz | operations.rb:84:2:84:11 | ... ^ ... | AssignExpr | +| operations.rb:84:2:84:11 | ... = ... | = | operations.rb:84:2:84:4 | baz | operations.rb:84:6:84:7 | ... ^ ... | AssignExpr | | operations.rb:84:2:84:11 | ... ^= ... | ^= | operations.rb:84:2:84:4 | baz | operations.rb:84:9:84:11 | qux | AssignBitwiseXorExpr | | operations.rb:87:3:87:8 | ... = ... | = | operations.rb:87:3:87:4 | @x | operations.rb:87:8:87:8 | 1 | AssignExpr | | operations.rb:88:3:88:9 | ... += ... | += | operations.rb:88:3:88:4 | @x | operations.rb:88:9:88:9 | 2 | AssignAddExpr | -| operations.rb:88:3:88:9 | ... = ... | = | operations.rb:88:3:88:4 | @x | operations.rb:88:3:88:9 | ... + ... | AssignExpr | +| operations.rb:88:3:88:9 | ... = ... | = | operations.rb:88:3:88:4 | @x | operations.rb:88:6:88:7 | ... + ... | AssignExpr | | operations.rb:90:3:90:9 | ... = ... | = | operations.rb:90:3:90:5 | @@y | operations.rb:90:9:90:9 | 3 | AssignExpr | | operations.rb:91:3:91:10 | ... /= ... | /= | operations.rb:91:3:91:5 | @@y | operations.rb:91:10:91:10 | 4 | AssignDivExpr | -| operations.rb:91:3:91:10 | ... = ... | = | operations.rb:91:3:91:5 | @@y | operations.rb:91:3:91:10 | ... / ... | AssignExpr | +| operations.rb:91:3:91:10 | ... = ... | = | operations.rb:91:3:91:5 | @@y | operations.rb:91:7:91:8 | ... / ... | AssignExpr | | operations.rb:94:1:94:15 | ... = ... | = | operations.rb:94:1:94:11 | $global_var | operations.rb:94:15:94:15 | 5 | AssignExpr | | operations.rb:95:1:95:16 | ... *= ... | *= | operations.rb:95:1:95:11 | $global_var | operations.rb:95:16:95:16 | 6 | AssignMulExpr | -| operations.rb:95:1:95:16 | ... = ... | = | operations.rb:95:1:95:11 | $global_var | operations.rb:95:1:95:16 | ... * ... | AssignExpr | +| operations.rb:95:1:95:16 | ... = ... | = | operations.rb:95:1:95:11 | $global_var | operations.rb:95:13:95:14 | ... * ... | AssignExpr | assignOperations | operations.rb:68:1:68:8 | ... += ... | += | operations.rb:68:1:68:1 | x | operations.rb:68:6:68:8 | 128 | AssignAddExpr | | operations.rb:69:1:69:7 | ... -= ... | -= | operations.rb:69:1:69:1 | y | operations.rb:69:6:69:7 | 32 | AssignSubExpr | diff --git a/ql/test/library-tests/ast/operations/binary.expected b/ql/test/library-tests/ast/operations/binary.expected index 998d2cc343f..d6916aad7c1 100644 --- a/ql/test/library-tests/ast/operations/binary.expected +++ b/ql/test/library-tests/ast/operations/binary.expected @@ -24,22 +24,22 @@ binaryOperations | operations.rb:63:1:63:7 | ... <=> ... | <=> | operations.rb:63:1:63:1 | a | operations.rb:63:7:63:7 | b | SpaceshipExpr | | operations.rb:64:1:64:15 | ... =~ ... | =~ | operations.rb:64:1:64:4 | name | operations.rb:64:9:64:15 | /foo.*/ | RegexMatchExpr | | operations.rb:65:1:65:17 | ... !~ ... | !~ | operations.rb:65:1:65:6 | handle | operations.rb:65:11:65:17 | /.*bar/ | NoRegexMatchExpr | -| operations.rb:68:1:68:8 | ... + ... | + | operations.rb:68:1:68:8 | x | operations.rb:68:6:68:8 | 128 | AddExpr | -| operations.rb:69:1:69:7 | ... - ... | - | operations.rb:69:1:69:7 | y | operations.rb:69:6:69:7 | 32 | SubExpr | -| operations.rb:70:1:70:7 | ... * ... | * | operations.rb:70:1:70:7 | a | operations.rb:70:6:70:7 | 12 | MulExpr | -| operations.rb:71:1:71:6 | ... / ... | / | operations.rb:71:1:71:6 | b | operations.rb:71:6:71:6 | 4 | DivExpr | -| operations.rb:72:1:72:6 | ... % ... | % | operations.rb:72:1:72:6 | z | operations.rb:72:6:72:6 | 2 | ModuloExpr | -| operations.rb:73:1:73:11 | ... ** ... | ** | operations.rb:73:1:73:11 | foo | operations.rb:73:9:73:11 | bar | ExponentExpr | -| operations.rb:76:2:76:8 | ... && ... | && | operations.rb:76:2:76:8 | x | operations.rb:76:8:76:8 | y | LogicalAndExpr | -| operations.rb:77:2:77:8 | ... \|\| ... | \|\| | operations.rb:77:2:77:8 | a | operations.rb:77:8:77:8 | b | LogicalOrExpr | -| operations.rb:80:2:80:8 | ... << ... | << | operations.rb:80:2:80:8 | x | operations.rb:80:8:80:8 | 2 | LShiftExpr | -| operations.rb:81:2:81:8 | ... >> ... | >> | operations.rb:81:2:81:8 | y | operations.rb:81:8:81:8 | 3 | RShiftExpr | -| operations.rb:82:2:82:12 | ... & ... | & | operations.rb:82:2:82:12 | foo | operations.rb:82:9:82:12 | mask | BitwiseAndExpr | -| operations.rb:83:2:83:12 | ... \| ... | \| | operations.rb:83:2:83:12 | bar | operations.rb:83:9:83:12 | 0x01 | BitwiseOrExpr | -| operations.rb:84:2:84:11 | ... ^ ... | ^ | operations.rb:84:2:84:11 | baz | operations.rb:84:9:84:11 | qux | BitwiseXorExpr | -| operations.rb:88:3:88:9 | ... + ... | + | operations.rb:88:3:88:9 | @x | operations.rb:88:9:88:9 | 2 | AddExpr | -| operations.rb:91:3:91:10 | ... / ... | / | operations.rb:91:3:91:10 | @@y | operations.rb:91:10:91:10 | 4 | DivExpr | -| operations.rb:95:1:95:16 | ... * ... | * | operations.rb:95:1:95:16 | $global_var | operations.rb:95:16:95:16 | 6 | MulExpr | +| operations.rb:68:3:68:4 | ... + ... | + | operations.rb:68:1:68:1 | x | operations.rb:68:6:68:8 | 128 | AddExpr | +| operations.rb:69:3:69:4 | ... - ... | - | operations.rb:69:1:69:1 | y | operations.rb:69:6:69:7 | 32 | SubExpr | +| operations.rb:70:3:70:4 | ... * ... | * | operations.rb:70:1:70:1 | a | operations.rb:70:6:70:7 | 12 | MulExpr | +| operations.rb:71:3:71:4 | ... / ... | / | operations.rb:71:1:71:1 | b | operations.rb:71:6:71:6 | 4 | DivExpr | +| operations.rb:72:3:72:4 | ... % ... | % | operations.rb:72:1:72:1 | z | operations.rb:72:6:72:6 | 2 | ModuloExpr | +| operations.rb:73:5:73:7 | ... ** ... | ** | operations.rb:73:1:73:3 | foo | operations.rb:73:9:73:11 | bar | ExponentExpr | +| operations.rb:76:4:76:6 | ... && ... | && | operations.rb:76:2:76:2 | x | operations.rb:76:8:76:8 | y | LogicalAndExpr | +| operations.rb:77:4:77:6 | ... \|\| ... | \|\| | operations.rb:77:2:77:2 | a | operations.rb:77:8:77:8 | b | LogicalOrExpr | +| operations.rb:80:4:80:6 | ... << ... | << | operations.rb:80:2:80:2 | x | operations.rb:80:8:80:8 | 2 | LShiftExpr | +| operations.rb:81:4:81:6 | ... >> ... | >> | operations.rb:81:2:81:2 | y | operations.rb:81:8:81:8 | 3 | RShiftExpr | +| operations.rb:82:6:82:7 | ... & ... | & | operations.rb:82:2:82:4 | foo | operations.rb:82:9:82:12 | mask | BitwiseAndExpr | +| operations.rb:83:6:83:7 | ... \| ... | \| | operations.rb:83:2:83:4 | bar | operations.rb:83:9:83:12 | 0x01 | BitwiseOrExpr | +| operations.rb:84:6:84:7 | ... ^ ... | ^ | operations.rb:84:2:84:4 | baz | operations.rb:84:9:84:11 | qux | BitwiseXorExpr | +| operations.rb:88:6:88:7 | ... + ... | + | operations.rb:88:3:88:4 | @x | operations.rb:88:9:88:9 | 2 | AddExpr | +| operations.rb:91:7:91:8 | ... / ... | / | operations.rb:91:3:91:5 | @@y | operations.rb:91:10:91:10 | 4 | DivExpr | +| operations.rb:95:13:95:14 | ... * ... | * | operations.rb:95:1:95:11 | $global_var | operations.rb:95:16:95:16 | 6 | MulExpr | binaryArithmeticOperations | operations.rb:31:1:31:7 | ... + ... | + | operations.rb:31:1:31:1 | w | operations.rb:31:5:31:7 | 234 | AddExpr | | operations.rb:32:1:32:6 | ... - ... | - | operations.rb:32:1:32:1 | x | operations.rb:32:5:32:6 | 17 | SubExpr | @@ -47,33 +47,33 @@ binaryArithmeticOperations | operations.rb:34:1:34:5 | ... / ... | / | operations.rb:34:1:34:1 | z | operations.rb:34:5:34:5 | 2 | DivExpr | | operations.rb:35:1:35:7 | ... % ... | % | operations.rb:35:1:35:3 | num | operations.rb:35:7:35:7 | 2 | ModuloExpr | | operations.rb:36:1:36:13 | ... ** ... | ** | operations.rb:36:1:36:4 | base | operations.rb:36:9:36:13 | power | ExponentExpr | -| operations.rb:68:1:68:8 | ... + ... | + | operations.rb:68:1:68:8 | x | operations.rb:68:6:68:8 | 128 | AddExpr | -| operations.rb:69:1:69:7 | ... - ... | - | operations.rb:69:1:69:7 | y | operations.rb:69:6:69:7 | 32 | SubExpr | -| operations.rb:70:1:70:7 | ... * ... | * | operations.rb:70:1:70:7 | a | operations.rb:70:6:70:7 | 12 | MulExpr | -| operations.rb:71:1:71:6 | ... / ... | / | operations.rb:71:1:71:6 | b | operations.rb:71:6:71:6 | 4 | DivExpr | -| operations.rb:72:1:72:6 | ... % ... | % | operations.rb:72:1:72:6 | z | operations.rb:72:6:72:6 | 2 | ModuloExpr | -| operations.rb:73:1:73:11 | ... ** ... | ** | operations.rb:73:1:73:11 | foo | operations.rb:73:9:73:11 | bar | ExponentExpr | -| operations.rb:88:3:88:9 | ... + ... | + | operations.rb:88:3:88:9 | @x | operations.rb:88:9:88:9 | 2 | AddExpr | -| operations.rb:91:3:91:10 | ... / ... | / | operations.rb:91:3:91:10 | @@y | operations.rb:91:10:91:10 | 4 | DivExpr | -| operations.rb:95:1:95:16 | ... * ... | * | operations.rb:95:1:95:16 | $global_var | operations.rb:95:16:95:16 | 6 | MulExpr | +| operations.rb:68:3:68:4 | ... + ... | + | operations.rb:68:1:68:1 | x | operations.rb:68:6:68:8 | 128 | AddExpr | +| operations.rb:69:3:69:4 | ... - ... | - | operations.rb:69:1:69:1 | y | operations.rb:69:6:69:7 | 32 | SubExpr | +| operations.rb:70:3:70:4 | ... * ... | * | operations.rb:70:1:70:1 | a | operations.rb:70:6:70:7 | 12 | MulExpr | +| operations.rb:71:3:71:4 | ... / ... | / | operations.rb:71:1:71:1 | b | operations.rb:71:6:71:6 | 4 | DivExpr | +| operations.rb:72:3:72:4 | ... % ... | % | operations.rb:72:1:72:1 | z | operations.rb:72:6:72:6 | 2 | ModuloExpr | +| operations.rb:73:5:73:7 | ... ** ... | ** | operations.rb:73:1:73:3 | foo | operations.rb:73:9:73:11 | bar | ExponentExpr | +| operations.rb:88:6:88:7 | ... + ... | + | operations.rb:88:3:88:4 | @x | operations.rb:88:9:88:9 | 2 | AddExpr | +| operations.rb:91:7:91:8 | ... / ... | / | operations.rb:91:3:91:5 | @@y | operations.rb:91:10:91:10 | 4 | DivExpr | +| operations.rb:95:13:95:14 | ... * ... | * | operations.rb:95:1:95:11 | $global_var | operations.rb:95:16:95:16 | 6 | MulExpr | binaryLogicalOperations | operations.rb:39:1:39:10 | ... && ... | && | operations.rb:39:1:39:3 | foo | operations.rb:39:8:39:10 | bar | LogicalAndExpr | | operations.rb:40:1:40:11 | ... and ... | and | operations.rb:40:1:40:3 | baz | operations.rb:40:9:40:11 | qux | LogicalAndExpr | | operations.rb:41:1:41:6 | ... or ... | or | operations.rb:41:1:41:1 | a | operations.rb:41:6:41:6 | b | LogicalOrExpr | | operations.rb:42:1:42:6 | ... \|\| ... | \|\| | operations.rb:42:1:42:1 | x | operations.rb:42:6:42:6 | y | LogicalOrExpr | -| operations.rb:76:2:76:8 | ... && ... | && | operations.rb:76:2:76:8 | x | operations.rb:76:8:76:8 | y | LogicalAndExpr | -| operations.rb:77:2:77:8 | ... \|\| ... | \|\| | operations.rb:77:2:77:8 | a | operations.rb:77:8:77:8 | b | LogicalOrExpr | +| operations.rb:76:4:76:6 | ... && ... | && | operations.rb:76:2:76:2 | x | operations.rb:76:8:76:8 | y | LogicalAndExpr | +| operations.rb:77:4:77:6 | ... \|\| ... | \|\| | operations.rb:77:2:77:2 | a | operations.rb:77:8:77:8 | b | LogicalOrExpr | binaryBitwiseOperations | operations.rb:45:1:45:6 | ... << ... | << | operations.rb:45:1:45:1 | x | operations.rb:45:6:45:6 | 3 | LShiftExpr | | operations.rb:46:1:46:7 | ... >> ... | >> | operations.rb:46:1:46:1 | y | operations.rb:46:6:46:7 | 16 | RShiftExpr | | operations.rb:47:1:47:10 | ... & ... | & | operations.rb:47:1:47:3 | foo | operations.rb:47:7:47:10 | 0xff | BitwiseAndExpr | | operations.rb:48:1:48:10 | ... \| ... | \| | operations.rb:48:1:48:3 | bar | operations.rb:48:7:48:10 | 0x02 | BitwiseOrExpr | | operations.rb:49:1:49:9 | ... ^ ... | ^ | operations.rb:49:1:49:3 | baz | operations.rb:49:7:49:9 | qux | BitwiseXorExpr | -| operations.rb:80:2:80:8 | ... << ... | << | operations.rb:80:2:80:8 | x | operations.rb:80:8:80:8 | 2 | LShiftExpr | -| operations.rb:81:2:81:8 | ... >> ... | >> | operations.rb:81:2:81:8 | y | operations.rb:81:8:81:8 | 3 | RShiftExpr | -| operations.rb:82:2:82:12 | ... & ... | & | operations.rb:82:2:82:12 | foo | operations.rb:82:9:82:12 | mask | BitwiseAndExpr | -| operations.rb:83:2:83:12 | ... \| ... | \| | operations.rb:83:2:83:12 | bar | operations.rb:83:9:83:12 | 0x01 | BitwiseOrExpr | -| operations.rb:84:2:84:11 | ... ^ ... | ^ | operations.rb:84:2:84:11 | baz | operations.rb:84:9:84:11 | qux | BitwiseXorExpr | +| operations.rb:80:4:80:6 | ... << ... | << | operations.rb:80:2:80:2 | x | operations.rb:80:8:80:8 | 2 | LShiftExpr | +| operations.rb:81:4:81:6 | ... >> ... | >> | operations.rb:81:2:81:2 | y | operations.rb:81:8:81:8 | 3 | RShiftExpr | +| operations.rb:82:6:82:7 | ... & ... | & | operations.rb:82:2:82:4 | foo | operations.rb:82:9:82:12 | mask | BitwiseAndExpr | +| operations.rb:83:6:83:7 | ... \| ... | \| | operations.rb:83:2:83:4 | bar | operations.rb:83:9:83:12 | 0x01 | BitwiseOrExpr | +| operations.rb:84:6:84:7 | ... ^ ... | ^ | operations.rb:84:2:84:4 | baz | operations.rb:84:9:84:11 | qux | BitwiseXorExpr | comparisonOperations | operations.rb:52:1:52:6 | ... == ... | == | operations.rb:52:1:52:1 | x | operations.rb:52:6:52:6 | y | EqExpr | | operations.rb:53:1:53:8 | ... != ... | != | operations.rb:53:1:53:1 | a | operations.rb:53:6:53:8 | 123 | NEExpr | diff --git a/ql/test/library-tests/ast/operations/operation.expected b/ql/test/library-tests/ast/operations/operation.expected index 86818353455..b3adabbeee4 100644 --- a/ql/test/library-tests/ast/operations/operation.expected +++ b/ql/test/library-tests/ast/operations/operation.expected @@ -90,105 +90,105 @@ | operations.rb:64:1:64:15 | ... =~ ... | =~ | operations.rb:64:9:64:15 | /foo.*/ | RegexMatchExpr | | operations.rb:65:1:65:17 | ... !~ ... | !~ | operations.rb:65:1:65:6 | handle | NoRegexMatchExpr | | operations.rb:65:1:65:17 | ... !~ ... | !~ | operations.rb:65:11:65:17 | /.*bar/ | NoRegexMatchExpr | -| operations.rb:68:1:68:8 | ... + ... | + | operations.rb:68:1:68:8 | x | AddExpr | -| operations.rb:68:1:68:8 | ... + ... | + | operations.rb:68:6:68:8 | 128 | AddExpr | | operations.rb:68:1:68:8 | ... += ... | += | operations.rb:68:1:68:1 | x | AssignAddExpr | | operations.rb:68:1:68:8 | ... += ... | += | operations.rb:68:6:68:8 | 128 | AssignAddExpr | | operations.rb:68:1:68:8 | ... = ... | = | operations.rb:68:1:68:1 | x | AssignExpr | -| operations.rb:68:1:68:8 | ... = ... | = | operations.rb:68:1:68:8 | ... + ... | AssignExpr | -| operations.rb:69:1:69:7 | ... - ... | - | operations.rb:69:1:69:7 | y | SubExpr | -| operations.rb:69:1:69:7 | ... - ... | - | operations.rb:69:6:69:7 | 32 | SubExpr | +| operations.rb:68:1:68:8 | ... = ... | = | operations.rb:68:3:68:4 | ... + ... | AssignExpr | +| operations.rb:68:3:68:4 | ... + ... | + | operations.rb:68:1:68:1 | x | AddExpr | +| operations.rb:68:3:68:4 | ... + ... | + | operations.rb:68:6:68:8 | 128 | AddExpr | | operations.rb:69:1:69:7 | ... -= ... | -= | operations.rb:69:1:69:1 | y | AssignSubExpr | | operations.rb:69:1:69:7 | ... -= ... | -= | operations.rb:69:6:69:7 | 32 | AssignSubExpr | | operations.rb:69:1:69:7 | ... = ... | = | operations.rb:69:1:69:1 | y | AssignExpr | -| operations.rb:69:1:69:7 | ... = ... | = | operations.rb:69:1:69:7 | ... - ... | AssignExpr | -| operations.rb:70:1:70:7 | ... * ... | * | operations.rb:70:1:70:7 | a | MulExpr | -| operations.rb:70:1:70:7 | ... * ... | * | operations.rb:70:6:70:7 | 12 | MulExpr | +| operations.rb:69:1:69:7 | ... = ... | = | operations.rb:69:3:69:4 | ... - ... | AssignExpr | +| operations.rb:69:3:69:4 | ... - ... | - | operations.rb:69:1:69:1 | y | SubExpr | +| operations.rb:69:3:69:4 | ... - ... | - | operations.rb:69:6:69:7 | 32 | SubExpr | | operations.rb:70:1:70:7 | ... *= ... | *= | operations.rb:70:1:70:1 | a | AssignMulExpr | | operations.rb:70:1:70:7 | ... *= ... | *= | operations.rb:70:6:70:7 | 12 | AssignMulExpr | | operations.rb:70:1:70:7 | ... = ... | = | operations.rb:70:1:70:1 | a | AssignExpr | -| operations.rb:70:1:70:7 | ... = ... | = | operations.rb:70:1:70:7 | ... * ... | AssignExpr | -| operations.rb:71:1:71:6 | ... / ... | / | operations.rb:71:1:71:6 | b | DivExpr | -| operations.rb:71:1:71:6 | ... / ... | / | operations.rb:71:6:71:6 | 4 | DivExpr | +| operations.rb:70:1:70:7 | ... = ... | = | operations.rb:70:3:70:4 | ... * ... | AssignExpr | +| operations.rb:70:3:70:4 | ... * ... | * | operations.rb:70:1:70:1 | a | MulExpr | +| operations.rb:70:3:70:4 | ... * ... | * | operations.rb:70:6:70:7 | 12 | MulExpr | | operations.rb:71:1:71:6 | ... /= ... | /= | operations.rb:71:1:71:1 | b | AssignDivExpr | | operations.rb:71:1:71:6 | ... /= ... | /= | operations.rb:71:6:71:6 | 4 | AssignDivExpr | | operations.rb:71:1:71:6 | ... = ... | = | operations.rb:71:1:71:1 | b | AssignExpr | -| operations.rb:71:1:71:6 | ... = ... | = | operations.rb:71:1:71:6 | ... / ... | AssignExpr | -| operations.rb:72:1:72:6 | ... % ... | % | operations.rb:72:1:72:6 | z | ModuloExpr | -| operations.rb:72:1:72:6 | ... % ... | % | operations.rb:72:6:72:6 | 2 | ModuloExpr | +| operations.rb:71:1:71:6 | ... = ... | = | operations.rb:71:3:71:4 | ... / ... | AssignExpr | +| operations.rb:71:3:71:4 | ... / ... | / | operations.rb:71:1:71:1 | b | DivExpr | +| operations.rb:71:3:71:4 | ... / ... | / | operations.rb:71:6:71:6 | 4 | DivExpr | | operations.rb:72:1:72:6 | ... %= ... | %= | operations.rb:72:1:72:1 | z | AssignModuloExpr | | operations.rb:72:1:72:6 | ... %= ... | %= | operations.rb:72:6:72:6 | 2 | AssignModuloExpr | | operations.rb:72:1:72:6 | ... = ... | = | operations.rb:72:1:72:1 | z | AssignExpr | -| operations.rb:72:1:72:6 | ... = ... | = | operations.rb:72:1:72:6 | ... % ... | AssignExpr | -| operations.rb:73:1:73:11 | ... ** ... | ** | operations.rb:73:1:73:11 | foo | ExponentExpr | -| operations.rb:73:1:73:11 | ... ** ... | ** | operations.rb:73:9:73:11 | bar | ExponentExpr | +| operations.rb:72:1:72:6 | ... = ... | = | operations.rb:72:3:72:4 | ... % ... | AssignExpr | +| operations.rb:72:3:72:4 | ... % ... | % | operations.rb:72:1:72:1 | z | ModuloExpr | +| operations.rb:72:3:72:4 | ... % ... | % | operations.rb:72:6:72:6 | 2 | ModuloExpr | | operations.rb:73:1:73:11 | ... **= ... | **= | operations.rb:73:1:73:3 | foo | AssignExponentExpr | | operations.rb:73:1:73:11 | ... **= ... | **= | operations.rb:73:9:73:11 | bar | AssignExponentExpr | | operations.rb:73:1:73:11 | ... = ... | = | operations.rb:73:1:73:3 | foo | AssignExpr | -| operations.rb:73:1:73:11 | ... = ... | = | operations.rb:73:1:73:11 | ... ** ... | AssignExpr | -| operations.rb:76:2:76:8 | ... && ... | && | operations.rb:76:2:76:8 | x | LogicalAndExpr | -| operations.rb:76:2:76:8 | ... && ... | && | operations.rb:76:8:76:8 | y | LogicalAndExpr | +| operations.rb:73:1:73:11 | ... = ... | = | operations.rb:73:5:73:7 | ... ** ... | AssignExpr | +| operations.rb:73:5:73:7 | ... ** ... | ** | operations.rb:73:1:73:3 | foo | ExponentExpr | +| operations.rb:73:5:73:7 | ... ** ... | ** | operations.rb:73:9:73:11 | bar | ExponentExpr | | operations.rb:76:2:76:8 | ... &&= ... | &&= | operations.rb:76:2:76:2 | x | AssignLogicalAndExpr | | operations.rb:76:2:76:8 | ... &&= ... | &&= | operations.rb:76:8:76:8 | y | AssignLogicalAndExpr | | operations.rb:76:2:76:8 | ... = ... | = | operations.rb:76:2:76:2 | x | AssignExpr | -| operations.rb:76:2:76:8 | ... = ... | = | operations.rb:76:2:76:8 | ... && ... | AssignExpr | +| operations.rb:76:2:76:8 | ... = ... | = | operations.rb:76:4:76:6 | ... && ... | AssignExpr | +| operations.rb:76:4:76:6 | ... && ... | && | operations.rb:76:2:76:2 | x | LogicalAndExpr | +| operations.rb:76:4:76:6 | ... && ... | && | operations.rb:76:8:76:8 | y | LogicalAndExpr | | operations.rb:77:2:77:8 | ... = ... | = | operations.rb:77:2:77:2 | a | AssignExpr | -| operations.rb:77:2:77:8 | ... = ... | = | operations.rb:77:2:77:8 | ... \|\| ... | AssignExpr | -| operations.rb:77:2:77:8 | ... \|\| ... | \|\| | operations.rb:77:2:77:8 | a | LogicalOrExpr | -| operations.rb:77:2:77:8 | ... \|\| ... | \|\| | operations.rb:77:8:77:8 | b | LogicalOrExpr | +| operations.rb:77:2:77:8 | ... = ... | = | operations.rb:77:4:77:6 | ... \|\| ... | AssignExpr | | operations.rb:77:2:77:8 | ... \|\|= ... | \|\|= | operations.rb:77:2:77:2 | a | AssignLogicalOrExpr | | operations.rb:77:2:77:8 | ... \|\|= ... | \|\|= | operations.rb:77:8:77:8 | b | AssignLogicalOrExpr | -| operations.rb:80:2:80:8 | ... << ... | << | operations.rb:80:2:80:8 | x | LShiftExpr | -| operations.rb:80:2:80:8 | ... << ... | << | operations.rb:80:8:80:8 | 2 | LShiftExpr | +| operations.rb:77:4:77:6 | ... \|\| ... | \|\| | operations.rb:77:2:77:2 | a | LogicalOrExpr | +| operations.rb:77:4:77:6 | ... \|\| ... | \|\| | operations.rb:77:8:77:8 | b | LogicalOrExpr | | operations.rb:80:2:80:8 | ... <<= ... | <<= | operations.rb:80:2:80:2 | x | AssignLShiftExpr | | operations.rb:80:2:80:8 | ... <<= ... | <<= | operations.rb:80:8:80:8 | 2 | AssignLShiftExpr | | operations.rb:80:2:80:8 | ... = ... | = | operations.rb:80:2:80:2 | x | AssignExpr | -| operations.rb:80:2:80:8 | ... = ... | = | operations.rb:80:2:80:8 | ... << ... | AssignExpr | +| operations.rb:80:2:80:8 | ... = ... | = | operations.rb:80:4:80:6 | ... << ... | AssignExpr | +| operations.rb:80:4:80:6 | ... << ... | << | operations.rb:80:2:80:2 | x | LShiftExpr | +| operations.rb:80:4:80:6 | ... << ... | << | operations.rb:80:8:80:8 | 2 | LShiftExpr | | operations.rb:81:2:81:8 | ... = ... | = | operations.rb:81:2:81:2 | y | AssignExpr | -| operations.rb:81:2:81:8 | ... = ... | = | operations.rb:81:2:81:8 | ... >> ... | AssignExpr | -| operations.rb:81:2:81:8 | ... >> ... | >> | operations.rb:81:2:81:8 | y | RShiftExpr | -| operations.rb:81:2:81:8 | ... >> ... | >> | operations.rb:81:8:81:8 | 3 | RShiftExpr | +| operations.rb:81:2:81:8 | ... = ... | = | operations.rb:81:4:81:6 | ... >> ... | AssignExpr | | operations.rb:81:2:81:8 | ... >>= ... | >>= | operations.rb:81:2:81:2 | y | AssignRShiftExpr | | operations.rb:81:2:81:8 | ... >>= ... | >>= | operations.rb:81:8:81:8 | 3 | AssignRShiftExpr | -| operations.rb:82:2:82:12 | ... & ... | & | operations.rb:82:2:82:12 | foo | BitwiseAndExpr | -| operations.rb:82:2:82:12 | ... & ... | & | operations.rb:82:9:82:12 | mask | BitwiseAndExpr | +| operations.rb:81:4:81:6 | ... >> ... | >> | operations.rb:81:2:81:2 | y | RShiftExpr | +| operations.rb:81:4:81:6 | ... >> ... | >> | operations.rb:81:8:81:8 | 3 | RShiftExpr | | operations.rb:82:2:82:12 | ... &= ... | &= | operations.rb:82:2:82:4 | foo | AssignBitwiseAndExpr | | operations.rb:82:2:82:12 | ... &= ... | &= | operations.rb:82:9:82:12 | mask | AssignBitwiseAndExpr | | operations.rb:82:2:82:12 | ... = ... | = | operations.rb:82:2:82:4 | foo | AssignExpr | -| operations.rb:82:2:82:12 | ... = ... | = | operations.rb:82:2:82:12 | ... & ... | AssignExpr | +| operations.rb:82:2:82:12 | ... = ... | = | operations.rb:82:6:82:7 | ... & ... | AssignExpr | +| operations.rb:82:6:82:7 | ... & ... | & | operations.rb:82:2:82:4 | foo | BitwiseAndExpr | +| operations.rb:82:6:82:7 | ... & ... | & | operations.rb:82:9:82:12 | mask | BitwiseAndExpr | | operations.rb:83:2:83:12 | ... = ... | = | operations.rb:83:2:83:4 | bar | AssignExpr | -| operations.rb:83:2:83:12 | ... = ... | = | operations.rb:83:2:83:12 | ... \| ... | AssignExpr | -| operations.rb:83:2:83:12 | ... \| ... | \| | operations.rb:83:2:83:12 | bar | BitwiseOrExpr | -| operations.rb:83:2:83:12 | ... \| ... | \| | operations.rb:83:9:83:12 | 0x01 | BitwiseOrExpr | +| operations.rb:83:2:83:12 | ... = ... | = | operations.rb:83:6:83:7 | ... \| ... | AssignExpr | | operations.rb:83:2:83:12 | ... \|= ... | \|= | operations.rb:83:2:83:4 | bar | AssignBitwiseOrExpr | | operations.rb:83:2:83:12 | ... \|= ... | \|= | operations.rb:83:9:83:12 | 0x01 | AssignBitwiseOrExpr | +| operations.rb:83:6:83:7 | ... \| ... | \| | operations.rb:83:2:83:4 | bar | BitwiseOrExpr | +| operations.rb:83:6:83:7 | ... \| ... | \| | operations.rb:83:9:83:12 | 0x01 | BitwiseOrExpr | | operations.rb:84:2:84:11 | ... = ... | = | operations.rb:84:2:84:4 | baz | AssignExpr | -| operations.rb:84:2:84:11 | ... = ... | = | operations.rb:84:2:84:11 | ... ^ ... | AssignExpr | -| operations.rb:84:2:84:11 | ... ^ ... | ^ | operations.rb:84:2:84:11 | baz | BitwiseXorExpr | -| operations.rb:84:2:84:11 | ... ^ ... | ^ | operations.rb:84:9:84:11 | qux | BitwiseXorExpr | +| operations.rb:84:2:84:11 | ... = ... | = | operations.rb:84:6:84:7 | ... ^ ... | AssignExpr | | operations.rb:84:2:84:11 | ... ^= ... | ^= | operations.rb:84:2:84:4 | baz | AssignBitwiseXorExpr | | operations.rb:84:2:84:11 | ... ^= ... | ^= | operations.rb:84:9:84:11 | qux | AssignBitwiseXorExpr | +| operations.rb:84:6:84:7 | ... ^ ... | ^ | operations.rb:84:2:84:4 | baz | BitwiseXorExpr | +| operations.rb:84:6:84:7 | ... ^ ... | ^ | operations.rb:84:9:84:11 | qux | BitwiseXorExpr | | operations.rb:87:3:87:8 | ... = ... | = | operations.rb:87:3:87:4 | @x | AssignExpr | | operations.rb:87:3:87:8 | ... = ... | = | operations.rb:87:8:87:8 | 1 | AssignExpr | -| operations.rb:88:3:88:9 | ... + ... | + | operations.rb:88:3:88:9 | @x | AddExpr | -| operations.rb:88:3:88:9 | ... + ... | + | operations.rb:88:9:88:9 | 2 | AddExpr | | operations.rb:88:3:88:9 | ... += ... | += | operations.rb:88:3:88:4 | @x | AssignAddExpr | | operations.rb:88:3:88:9 | ... += ... | += | operations.rb:88:9:88:9 | 2 | AssignAddExpr | | operations.rb:88:3:88:9 | ... = ... | = | operations.rb:88:3:88:4 | @x | AssignExpr | -| operations.rb:88:3:88:9 | ... = ... | = | operations.rb:88:3:88:9 | ... + ... | AssignExpr | +| operations.rb:88:3:88:9 | ... = ... | = | operations.rb:88:6:88:7 | ... + ... | AssignExpr | +| operations.rb:88:6:88:7 | ... + ... | + | operations.rb:88:3:88:4 | @x | AddExpr | +| operations.rb:88:6:88:7 | ... + ... | + | operations.rb:88:9:88:9 | 2 | AddExpr | | operations.rb:90:3:90:9 | ... = ... | = | operations.rb:90:3:90:5 | @@y | AssignExpr | | operations.rb:90:3:90:9 | ... = ... | = | operations.rb:90:9:90:9 | 3 | AssignExpr | -| operations.rb:91:3:91:10 | ... / ... | / | operations.rb:91:3:91:10 | @@y | DivExpr | -| operations.rb:91:3:91:10 | ... / ... | / | operations.rb:91:10:91:10 | 4 | DivExpr | | operations.rb:91:3:91:10 | ... /= ... | /= | operations.rb:91:3:91:5 | @@y | AssignDivExpr | | operations.rb:91:3:91:10 | ... /= ... | /= | operations.rb:91:10:91:10 | 4 | AssignDivExpr | | operations.rb:91:3:91:10 | ... = ... | = | operations.rb:91:3:91:5 | @@y | AssignExpr | -| operations.rb:91:3:91:10 | ... = ... | = | operations.rb:91:3:91:10 | ... / ... | AssignExpr | +| operations.rb:91:3:91:10 | ... = ... | = | operations.rb:91:7:91:8 | ... / ... | AssignExpr | +| operations.rb:91:7:91:8 | ... / ... | / | operations.rb:91:3:91:5 | @@y | DivExpr | +| operations.rb:91:7:91:8 | ... / ... | / | operations.rb:91:10:91:10 | 4 | DivExpr | | operations.rb:94:1:94:15 | ... = ... | = | operations.rb:94:1:94:11 | $global_var | AssignExpr | | operations.rb:94:1:94:15 | ... = ... | = | operations.rb:94:15:94:15 | 5 | AssignExpr | -| operations.rb:95:1:95:16 | ... * ... | * | operations.rb:95:1:95:16 | $global_var | MulExpr | -| operations.rb:95:1:95:16 | ... * ... | * | operations.rb:95:16:95:16 | 6 | MulExpr | | operations.rb:95:1:95:16 | ... *= ... | *= | operations.rb:95:1:95:11 | $global_var | AssignMulExpr | | operations.rb:95:1:95:16 | ... *= ... | *= | operations.rb:95:16:95:16 | 6 | AssignMulExpr | | operations.rb:95:1:95:16 | ... = ... | = | operations.rb:95:1:95:11 | $global_var | AssignExpr | -| operations.rb:95:1:95:16 | ... = ... | = | operations.rb:95:1:95:16 | ... * ... | AssignExpr | +| operations.rb:95:1:95:16 | ... = ... | = | operations.rb:95:13:95:14 | ... * ... | AssignExpr | +| operations.rb:95:13:95:14 | ... * ... | * | operations.rb:95:1:95:11 | $global_var | MulExpr | +| operations.rb:95:13:95:14 | ... * ... | * | operations.rb:95:16:95:16 | 6 | MulExpr | diff --git a/ql/test/library-tests/controlflow/graph/Cfg.expected b/ql/test/library-tests/controlflow/graph/Cfg.expected index 0df60a588ae..b293cc2b11a 100644 --- a/ql/test/library-tests/controlflow/graph/Cfg.expected +++ b/ql/test/library-tests/controlflow/graph/Cfg.expected @@ -1414,12 +1414,12 @@ cfg.rb: # 125| ... = ... #-----| -> last -# 125| ... + ... -#-----| -> ... = ... - # 125| some #-----| -> 10 +# 125| ... + ... +#-----| -> ... = ... + # 125| 10 #-----| -> ... + ... @@ -1856,12 +1856,12 @@ cfg.rb: # 176| ... = ... #-----| -> self -# 176| ... + ... -#-----| -> ... = ... - # 176| x #-----| -> 10 +# 176| ... + ... +#-----| -> ... = ... + # 176| 10 #-----| -> ... + ... @@ -1904,12 +1904,12 @@ cfg.rb: # 179| ... = ... #-----| -> ( ... ) -# 179| ... + ... -#-----| -> ... = ... - # 179| i #-----| -> 1 +# 179| ... + ... +#-----| -> ... = ... + # 179| 1 #-----| -> ... + ... @@ -1954,12 +1954,12 @@ cfg.rb: # 183| ... = ... #-----| -> x -# 183| ... + ... -#-----| -> ... = ... - # 183| x #-----| -> 1 +# 183| ... + ... +#-----| -> ... = ... + # 183| 1 #-----| -> ... + ... @@ -2009,12 +2009,12 @@ cfg.rb: # 188| ... = ... #-----| -> ( ... ) -# 188| ... - ... -#-----| -> ... = ... - # 188| i #-----| -> 1 +# 188| ... - ... +#-----| -> ... = ... + # 188| 1 #-----| -> ... - ... @@ -2103,12 +2103,12 @@ desugar.rb: # 2| ... = ... #-----| -> exit m1 (normal) -# 2| ... + ... -#-----| -> ... = ... - # 2| x #-----| -> 1 +# 2| ... + ... +#-----| -> ... = ... + # 2| 1 #-----| -> ... + ... @@ -2212,12 +2212,12 @@ desugar.rb: # 15| ... = ... #-----| -> @@y -# 15| ... + ... -#-----| -> ... = ... - # 15| @x #-----| -> 2 +# 15| ... + ... +#-----| -> ... = ... + # 15| 2 #-----| -> ... + ... @@ -2236,12 +2236,12 @@ desugar.rb: # 18| ... = ... #-----| -> X -# 18| ... / ... -#-----| -> ... = ... - # 18| @@y #-----| -> 4 +# 18| ... / ... +#-----| -> ... = ... + # 18| 4 #-----| -> ... / ... @@ -2260,12 +2260,12 @@ desugar.rb: # 22| ... = ... #-----| -> exit desugar.rb (normal) -# 22| ... * ... -#-----| -> ... = ... - # 22| $global_var #-----| -> 6 +# 22| ... * ... +#-----| -> ... = ... + # 22| 6 #-----| -> ... * ... @@ -2951,12 +2951,12 @@ loops.rb: # 4| ... = ... #-----| -> do ... -# 4| ... - ... -#-----| -> ... = ... - # 4| x #-----| -> 1 +# 4| ... - ... +#-----| -> ... = ... + # 4| 1 #-----| -> ... - ... @@ -3005,12 +3005,12 @@ loops.rb: # 11| ... = ... #-----| -> x -# 11| ... - ... -#-----| -> ... = ... - # 11| x #-----| -> 1 +# 11| ... - ... +#-----| -> ... = ... + # 11| 1 #-----| -> ... - ... diff --git a/ql/test/library-tests/dataflow/local/DataflowStep.expected b/ql/test/library-tests/dataflow/local/DataflowStep.expected index 926a90e0207..936929f52b3 100644 --- a/ql/test/library-tests/dataflow/local/DataflowStep.expected +++ b/ql/test/library-tests/dataflow/local/DataflowStep.expected @@ -14,10 +14,10 @@ | local_dataflow.rb:5:7:5:13 | ( ... ) | local_dataflow.rb:5:3:5:13 | ... = ... | | local_dataflow.rb:5:8:5:12 | ... = ... | local_dataflow.rb:5:7:5:13 | ( ... ) | | local_dataflow.rb:5:12:5:12 | a | local_dataflow.rb:5:8:5:12 | ... = ... | -| local_dataflow.rb:5:12:5:12 | a | local_dataflow.rb:6:8:6:13 | a | +| local_dataflow.rb:5:12:5:12 | a | local_dataflow.rb:6:8:6:8 | a | | local_dataflow.rb:6:7:6:14 | ( ... ) | local_dataflow.rb:6:3:6:14 | ... = ... | -| local_dataflow.rb:6:8:6:13 | ... + ... | local_dataflow.rb:6:8:6:13 | ... = ... | | local_dataflow.rb:6:8:6:13 | ... = ... | local_dataflow.rb:6:7:6:14 | ( ... ) | +| local_dataflow.rb:6:10:6:11 | ... + ... | local_dataflow.rb:6:8:6:13 | ... = ... | | local_dataflow.rb:9:1:9:15 | ... = ... | local_dataflow.rb:10:14:10:18 | array | | local_dataflow.rb:9:9:9:15 | [...] | local_dataflow.rb:9:1:9:15 | ... = ... | | local_dataflow.rb:9:9:9:15 | [...] | local_dataflow.rb:9:1:9:15 | ... = ... | diff --git a/ql/test/library-tests/variables/ssa.expected b/ql/test/library-tests/variables/ssa.expected index 0170446ff64..349885cdfa1 100644 --- a/ql/test/library-tests/variables/ssa.expected +++ b/ql/test/library-tests/variables/ssa.expected @@ -126,7 +126,7 @@ read | scopes.rb:4:4:4:8 | ... = ... | scopes.rb:4:4:4:4 | a | scopes.rb:5:9:5:9 | a | | scopes.rb:7:1:7:5 | ... = ... | scopes.rb:7:1:7:1 | a | scopes.rb:8:6:8:6 | a | | scopes.rb:9:9:18:3 | | scopes.rb:7:1:7:1 | a | scopes.rb:10:9:10:9 | a | -| scopes.rb:9:9:18:3 | | scopes.rb:7:1:7:1 | a | scopes.rb:11:4:11:9 | a | +| scopes.rb:9:9:18:3 | | scopes.rb:7:1:7:1 | a | scopes.rb:11:4:11:4 | a | | scopes.rb:11:4:11:9 | ... = ... | scopes.rb:7:1:7:1 | a | scopes.rb:12:9:12:9 | a | | scopes.rb:13:4:13:32 | ... = ... | scopes.rb:7:1:7:1 | a | scopes.rb:14:9:14:9 | a | | scopes.rb:13:4:13:32 | ... = ... | scopes.rb:13:7:13:7 | b | scopes.rb:15:9:15:9 | b | @@ -149,7 +149,7 @@ read | ssa.rb:10:5:10:9 | ... = ... | ssa.rb:2:3:2:3 | i | ssa.rb:12:10:12:10 | i | | ssa.rb:19:9:19:9 | phi | ssa.rb:18:8:18:8 | x | ssa.rb:19:9:19:9 | x | | ssa.rb:19:9:19:9 | phi | ssa.rb:18:8:18:8 | x | ssa.rb:20:10:20:10 | x | -| ssa.rb:19:9:19:9 | phi | ssa.rb:18:8:18:8 | x | ssa.rb:21:5:21:10 | x | +| ssa.rb:19:9:19:9 | phi | ssa.rb:18:8:18:8 | x | ssa.rb:21:5:21:5 | x | | ssa.rb:25:8:25:15 | elements | ssa.rb:25:8:25:15 | elements | ssa.rb:26:15:26:22 | elements | | ssa.rb:26:7:26:10 | elem | ssa.rb:26:7:26:10 | elem | ssa.rb:27:10:27:13 | elem | | ssa.rb:26:12:26:22 | phi | ssa.rb:26:7:26:10 | elem | ssa.rb:29:8:29:11 | elem | @@ -160,12 +160,12 @@ read | ssa.rb:50:3:50:8 | phi | ssa.rb:49:14:49:14 | y | ssa.rb:50:8:50:8 | y | | ssa.rb:53:8:53:10 | foo | ssa.rb:53:8:53:10 | foo | ssa.rb:54:7:54:9 | foo | | ssa.rb:54:3:54:11 | ... = ... | ssa.rb:54:3:54:3 | x | ssa.rb:55:8:55:8 | x | -| ssa.rb:59:3:59:8 | ... = ... | ssa.rb:59:3:59:3 | x | ssa.rb:60:3:60:9 | x | +| ssa.rb:59:3:59:8 | ... = ... | ssa.rb:59:3:59:3 | x | ssa.rb:60:3:60:3 | x | | ssa.rb:60:3:60:9 | ... = ... | ssa.rb:59:3:59:3 | x | ssa.rb:61:8:61:8 | x | | ssa.rb:64:8:64:8 | a | ssa.rb:64:8:64:8 | a | ssa.rb:66:3:66:3 | a | | ssa.rb:66:3:70:5 | call to times | ssa.rb:65:3:65:10 | captured | ssa.rb:71:8:71:15 | captured | | ssa.rb:66:11:70:5 | | ssa.rb:65:3:65:10 | captured | ssa.rb:68:10:68:17 | captured | -| ssa.rb:66:11:70:5 | | ssa.rb:65:3:65:10 | captured | ssa.rb:69:5:69:17 | captured | +| ssa.rb:66:11:70:5 | | ssa.rb:65:3:65:10 | captured | ssa.rb:69:5:69:12 | captured | | ssa.rb:66:15:66:15 | a | ssa.rb:66:15:66:15 | a | ssa.rb:67:10:67:10 | a | | ssa.rb:76:7:78:5 | | ssa.rb:75:3:75:10 | captured | ssa.rb:77:15:77:22 | captured | | ssa.rb:84:10:86:8 | | ssa.rb:82:3:82:10 | captured | ssa.rb:85:15:85:22 | captured | @@ -232,7 +232,7 @@ firstRead | ssa.rb:50:3:50:8 | phi | ssa.rb:49:14:49:14 | y | ssa.rb:50:8:50:8 | y | | ssa.rb:53:8:53:10 | foo | ssa.rb:53:8:53:10 | foo | ssa.rb:54:7:54:9 | foo | | ssa.rb:54:3:54:11 | ... = ... | ssa.rb:54:3:54:3 | x | ssa.rb:55:8:55:8 | x | -| ssa.rb:59:3:59:8 | ... = ... | ssa.rb:59:3:59:3 | x | ssa.rb:60:3:60:9 | x | +| ssa.rb:59:3:59:8 | ... = ... | ssa.rb:59:3:59:3 | x | ssa.rb:60:3:60:3 | x | | ssa.rb:60:3:60:9 | ... = ... | ssa.rb:59:3:59:3 | x | ssa.rb:61:8:61:8 | x | | ssa.rb:64:8:64:8 | a | ssa.rb:64:8:64:8 | a | ssa.rb:66:3:66:3 | a | | ssa.rb:66:3:70:5 | call to times | ssa.rb:65:3:65:10 | captured | ssa.rb:71:8:71:15 | captured | @@ -278,7 +278,7 @@ lastRead | parameters.rb:55:4:55:9 | phi | parameters.rb:53:1:53:1 | x | parameters.rb:55:9:55:9 | x | | scopes.rb:4:4:4:8 | ... = ... | scopes.rb:4:4:4:4 | a | scopes.rb:5:9:5:9 | a | | scopes.rb:7:1:7:5 | ... = ... | scopes.rb:7:1:7:1 | a | scopes.rb:8:6:8:6 | a | -| scopes.rb:9:9:18:3 | | scopes.rb:7:1:7:1 | a | scopes.rb:11:4:11:9 | a | +| scopes.rb:9:9:18:3 | | scopes.rb:7:1:7:1 | a | scopes.rb:11:4:11:4 | a | | scopes.rb:11:4:11:9 | ... = ... | scopes.rb:7:1:7:1 | a | scopes.rb:12:9:12:9 | a | | scopes.rb:13:4:13:32 | ... = ... | scopes.rb:7:1:7:1 | a | scopes.rb:14:9:14:9 | a | | scopes.rb:13:4:13:32 | ... = ... | scopes.rb:13:7:13:7 | b | scopes.rb:15:9:15:9 | b | @@ -293,7 +293,7 @@ lastRead | ssa.rb:6:5:6:9 | ... = ... | ssa.rb:2:3:2:3 | i | ssa.rb:8:10:8:10 | i | | ssa.rb:10:5:10:9 | ... = ... | ssa.rb:2:3:2:3 | i | ssa.rb:12:10:12:10 | i | | ssa.rb:19:9:19:9 | phi | ssa.rb:18:8:18:8 | x | ssa.rb:19:9:19:9 | x | -| ssa.rb:19:9:19:9 | phi | ssa.rb:18:8:18:8 | x | ssa.rb:21:5:21:10 | x | +| ssa.rb:19:9:19:9 | phi | ssa.rb:18:8:18:8 | x | ssa.rb:21:5:21:5 | x | | ssa.rb:25:8:25:15 | elements | ssa.rb:25:8:25:15 | elements | ssa.rb:26:15:26:22 | elements | | ssa.rb:26:7:26:10 | elem | ssa.rb:26:7:26:10 | elem | ssa.rb:27:10:27:13 | elem | | ssa.rb:26:12:26:22 | phi | ssa.rb:26:7:26:10 | elem | ssa.rb:29:8:29:11 | elem | @@ -304,11 +304,11 @@ lastRead | ssa.rb:50:3:50:8 | phi | ssa.rb:49:14:49:14 | y | ssa.rb:50:8:50:8 | y | | ssa.rb:53:8:53:10 | foo | ssa.rb:53:8:53:10 | foo | ssa.rb:54:7:54:9 | foo | | ssa.rb:54:3:54:11 | ... = ... | ssa.rb:54:3:54:3 | x | ssa.rb:55:8:55:8 | x | -| ssa.rb:59:3:59:8 | ... = ... | ssa.rb:59:3:59:3 | x | ssa.rb:60:3:60:9 | x | +| ssa.rb:59:3:59:8 | ... = ... | ssa.rb:59:3:59:3 | x | ssa.rb:60:3:60:3 | x | | ssa.rb:60:3:60:9 | ... = ... | ssa.rb:59:3:59:3 | x | ssa.rb:61:8:61:8 | x | | ssa.rb:64:8:64:8 | a | ssa.rb:64:8:64:8 | a | ssa.rb:66:3:66:3 | a | | ssa.rb:66:3:70:5 | call to times | ssa.rb:65:3:65:10 | captured | ssa.rb:71:8:71:15 | captured | -| ssa.rb:66:11:70:5 | | ssa.rb:65:3:65:10 | captured | ssa.rb:69:5:69:17 | captured | +| ssa.rb:66:11:70:5 | | ssa.rb:65:3:65:10 | captured | ssa.rb:69:5:69:12 | captured | | ssa.rb:66:15:66:15 | a | ssa.rb:66:15:66:15 | a | ssa.rb:67:10:67:10 | a | | ssa.rb:76:7:78:5 | | ssa.rb:75:3:75:10 | captured | ssa.rb:77:15:77:22 | captured | | ssa.rb:84:10:86:8 | | ssa.rb:82:3:82:10 | captured | ssa.rb:85:15:85:22 | captured | @@ -316,7 +316,7 @@ adjacentReads | nested_scopes.rb:13:11:13:15 | ... = ... | nested_scopes.rb:13:11:13:11 | a | nested_scopes.rb:14:16:14:16 | a | nested_scopes.rb:15:11:15:11 | a | | parameters.rb:7:26:7:31 | pizzas | parameters.rb:7:26:7:31 | pizzas | parameters.rb:8:6:8:11 | pizzas | parameters.rb:11:14:11:19 | pizzas | | parameters.rb:25:15:25:18 | name | parameters.rb:25:15:25:18 | name | parameters.rb:25:40:25:43 | name | parameters.rb:26:8:26:11 | name | -| scopes.rb:9:9:18:3 | | scopes.rb:7:1:7:1 | a | scopes.rb:10:9:10:9 | a | scopes.rb:11:4:11:9 | a | +| scopes.rb:9:9:18:3 | | scopes.rb:7:1:7:1 | a | scopes.rb:10:9:10:9 | a | scopes.rb:11:4:11:4 | a | | scopes.rb:27:1:27:5 | ... = ... | scopes.rb:27:1:27:1 | x | scopes.rb:28:8:28:8 | x | scopes.rb:31:10:31:10 | x | | scopes.rb:27:1:27:5 | ... = ... | scopes.rb:27:1:27:1 | x | scopes.rb:31:10:31:10 | x | scopes.rb:34:7:34:7 | x | | scopes.rb:27:1:27:5 | ... = ... | scopes.rb:27:1:27:1 | x | scopes.rb:34:7:34:7 | x | scopes.rb:34:14:34:14 | x | @@ -325,8 +325,8 @@ adjacentReads | ssa.rb:6:5:6:9 | ... = ... | ssa.rb:2:3:2:3 | i | ssa.rb:7:10:7:10 | i | ssa.rb:8:10:8:10 | i | | ssa.rb:10:5:10:9 | ... = ... | ssa.rb:2:3:2:3 | i | ssa.rb:11:10:11:10 | i | ssa.rb:12:10:12:10 | i | | ssa.rb:19:9:19:9 | phi | ssa.rb:18:8:18:8 | x | ssa.rb:19:9:19:9 | x | ssa.rb:20:10:20:10 | x | -| ssa.rb:19:9:19:9 | phi | ssa.rb:18:8:18:8 | x | ssa.rb:20:10:20:10 | x | ssa.rb:21:5:21:10 | x | -| ssa.rb:66:11:70:5 | | ssa.rb:65:3:65:10 | captured | ssa.rb:68:10:68:17 | captured | ssa.rb:69:5:69:17 | captured | +| ssa.rb:19:9:19:9 | phi | ssa.rb:18:8:18:8 | x | ssa.rb:20:10:20:10 | x | ssa.rb:21:5:21:5 | x | +| ssa.rb:66:11:70:5 | | ssa.rb:65:3:65:10 | captured | ssa.rb:68:10:68:17 | captured | ssa.rb:69:5:69:12 | captured | phi | parameters.rb:37:3:37:18 | phi | parameters.rb:35:16:35:16 | b | parameters.rb:35:1:38:3 | | | parameters.rb:37:3:37:18 | phi | parameters.rb:35:16:35:16 | b | parameters.rb:35:16:35:20 | ... = ... | diff --git a/ql/test/library-tests/variables/varaccess.expected b/ql/test/library-tests/variables/varaccess.expected index 56d1193c39e..241247e4003 100644 --- a/ql/test/library-tests/variables/varaccess.expected +++ b/ql/test/library-tests/variables/varaccess.expected @@ -103,7 +103,7 @@ variableAccess | scopes.rb:9:14:9:14 | x | scopes.rb:9:14:9:14 | x | scopes.rb:9:9:18:3 | do ... end | | scopes.rb:10:9:10:9 | a | scopes.rb:7:1:7:1 | a | scopes.rb:1:1:49:4 | scopes.rb | | scopes.rb:11:4:11:4 | a | scopes.rb:7:1:7:1 | a | scopes.rb:1:1:49:4 | scopes.rb | -| scopes.rb:11:4:11:9 | a | scopes.rb:7:1:7:1 | a | scopes.rb:1:1:49:4 | scopes.rb | +| scopes.rb:11:4:11:4 | a | scopes.rb:7:1:7:1 | a | scopes.rb:1:1:49:4 | scopes.rb | | scopes.rb:12:9:12:9 | a | scopes.rb:7:1:7:1 | a | scopes.rb:1:1:49:4 | scopes.rb | | scopes.rb:13:4:13:4 | a | scopes.rb:7:1:7:1 | a | scopes.rb:1:1:49:4 | scopes.rb | | scopes.rb:13:7:13:7 | b | scopes.rb:13:7:13:7 | b | scopes.rb:9:9:18:3 | do ... end | @@ -145,7 +145,7 @@ variableAccess | ssa.rb:19:9:19:9 | x | ssa.rb:18:8:18:8 | x | ssa.rb:18:1:23:3 | m1 | | ssa.rb:20:10:20:10 | x | ssa.rb:18:8:18:8 | x | ssa.rb:18:1:23:3 | m1 | | ssa.rb:21:5:21:5 | x | ssa.rb:18:8:18:8 | x | ssa.rb:18:1:23:3 | m1 | -| ssa.rb:21:5:21:10 | x | ssa.rb:18:8:18:8 | x | ssa.rb:18:1:23:3 | m1 | +| ssa.rb:21:5:21:5 | x | ssa.rb:18:8:18:8 | x | ssa.rb:18:1:23:3 | m1 | | ssa.rb:25:8:25:15 | elements | ssa.rb:25:8:25:15 | elements | ssa.rb:25:1:30:3 | m2 | | ssa.rb:26:7:26:10 | elem | ssa.rb:26:7:26:10 | elem | ssa.rb:25:1:30:3 | m2 | | ssa.rb:26:15:26:22 | elements | ssa.rb:25:8:25:15 | elements | ssa.rb:25:1:30:3 | m2 | @@ -168,7 +168,7 @@ variableAccess | ssa.rb:55:8:55:8 | x | ssa.rb:54:3:54:3 | x | ssa.rb:53:1:56:3 | m7 | | ssa.rb:59:3:59:3 | x | ssa.rb:59:3:59:3 | x | ssa.rb:58:1:62:3 | m8 | | ssa.rb:60:3:60:3 | x | ssa.rb:59:3:59:3 | x | ssa.rb:58:1:62:3 | m8 | -| ssa.rb:60:3:60:9 | x | ssa.rb:59:3:59:3 | x | ssa.rb:58:1:62:3 | m8 | +| ssa.rb:60:3:60:3 | x | ssa.rb:59:3:59:3 | x | ssa.rb:58:1:62:3 | m8 | | ssa.rb:61:8:61:8 | x | ssa.rb:59:3:59:3 | x | ssa.rb:58:1:62:3 | m8 | | ssa.rb:64:8:64:8 | a | ssa.rb:64:8:64:8 | a | ssa.rb:64:1:72:3 | m9 | | ssa.rb:65:3:65:10 | captured | ssa.rb:65:3:65:10 | captured | ssa.rb:64:1:72:3 | m9 | @@ -177,7 +177,7 @@ variableAccess | ssa.rb:67:10:67:10 | a | ssa.rb:66:15:66:15 | a | ssa.rb:66:11:70:5 | do ... end | | ssa.rb:68:10:68:17 | captured | ssa.rb:65:3:65:10 | captured | ssa.rb:64:1:72:3 | m9 | | ssa.rb:69:5:69:12 | captured | ssa.rb:65:3:65:10 | captured | ssa.rb:64:1:72:3 | m9 | -| ssa.rb:69:5:69:17 | captured | ssa.rb:65:3:65:10 | captured | ssa.rb:64:1:72:3 | m9 | +| ssa.rb:69:5:69:12 | captured | ssa.rb:65:3:65:10 | captured | ssa.rb:64:1:72:3 | m9 | | ssa.rb:71:8:71:15 | captured | ssa.rb:65:3:65:10 | captured | ssa.rb:64:1:72:3 | m9 | | ssa.rb:75:3:75:10 | captured | ssa.rb:75:3:75:10 | captured | ssa.rb:74:1:79:3 | m10 | | ssa.rb:77:15:77:22 | captured | ssa.rb:75:3:75:10 | captured | ssa.rb:74:1:79:3 | m10 | @@ -332,7 +332,7 @@ readAccess | scopes.rb:5:9:5:9 | a | | scopes.rb:8:6:8:6 | a | | scopes.rb:10:9:10:9 | a | -| scopes.rb:11:4:11:9 | a | +| scopes.rb:11:4:11:4 | a | | scopes.rb:12:9:12:9 | a | | scopes.rb:14:9:14:9 | a | | scopes.rb:15:9:15:9 | b | @@ -356,7 +356,7 @@ readAccess | ssa.rb:15:8:15:8 | i | | ssa.rb:19:9:19:9 | x | | ssa.rb:20:10:20:10 | x | -| ssa.rb:21:5:21:10 | x | +| ssa.rb:21:5:21:5 | x | | ssa.rb:26:15:26:22 | elements | | ssa.rb:27:10:27:13 | elem | | ssa.rb:29:8:29:11 | elem | @@ -367,12 +367,12 @@ readAccess | ssa.rb:50:8:50:8 | y | | ssa.rb:54:7:54:9 | foo | | ssa.rb:55:8:55:8 | x | -| ssa.rb:60:3:60:9 | x | +| ssa.rb:60:3:60:3 | x | | ssa.rb:61:8:61:8 | x | | ssa.rb:66:3:66:3 | a | | ssa.rb:67:10:67:10 | a | | ssa.rb:68:10:68:17 | captured | -| ssa.rb:69:5:69:17 | captured | +| ssa.rb:69:5:69:12 | captured | | ssa.rb:71:8:71:15 | captured | | ssa.rb:77:15:77:22 | captured | | ssa.rb:85:15:85:22 | captured |