mirror of
https://github.com/github/codeql.git
synced 2026-02-20 00:43:44 +01:00
Reintroduce hidden then/else/do in AST; include all in CFG
This commit is contained in:
@@ -57,16 +57,6 @@ class ArgumentList extends Expr, TArgumentList {
|
||||
class StmtSequence extends Expr, TStmtSequence {
|
||||
override string getAPrimaryQlClass() { result = "StmtSequence" }
|
||||
|
||||
override string toString() {
|
||||
exists(int c | c = this.getNumberOfStatements() |
|
||||
c = 0 and result = ";"
|
||||
or
|
||||
c = 1 and result = this.getStmt(0).toString()
|
||||
or
|
||||
c > 1 and result = "...; ..."
|
||||
)
|
||||
}
|
||||
|
||||
/** Gets the `n`th statement in this sequence. */
|
||||
Stmt getStmt(int n) { none() }
|
||||
|
||||
@@ -91,6 +81,8 @@ private class Then extends StmtSequence, TThen {
|
||||
Then() { this = TThen(g) }
|
||||
|
||||
override Stmt getStmt(int n) { toGenerated(result) = g.getChild(n) }
|
||||
|
||||
final override string toString() { result = "then ..." }
|
||||
}
|
||||
|
||||
private class Else extends StmtSequence, TElse {
|
||||
@@ -99,6 +91,8 @@ private class Else extends StmtSequence, TElse {
|
||||
Else() { this = TElse(g) }
|
||||
|
||||
override Stmt getStmt(int n) { toGenerated(result) = g.getChild(n) }
|
||||
|
||||
final override string toString() { result = "else ..." }
|
||||
}
|
||||
|
||||
private class Do extends StmtSequence, TDo {
|
||||
@@ -107,6 +101,8 @@ private class Do extends StmtSequence, TDo {
|
||||
Do() { this = TDo(g) }
|
||||
|
||||
override Stmt getStmt(int n) { toGenerated(result) = g.getChild(n) }
|
||||
|
||||
final override string toString() { result = "do ..." }
|
||||
}
|
||||
|
||||
private class Ensure extends StmtSequence, TEnsure {
|
||||
@@ -212,13 +208,7 @@ class ParenthesizedExpr extends StmtSequence, TParenthesizedExpr {
|
||||
|
||||
final override string getAPrimaryQlClass() { result = "ParenthesizedExpr" }
|
||||
|
||||
final override string toString() {
|
||||
exists(int c | c = this.getNumberOfStatements() |
|
||||
c = 0 and result = "()"
|
||||
or
|
||||
c > 0 and result = "(" + StmtSequence.super.toString() + ")"
|
||||
)
|
||||
}
|
||||
final override string toString() { result = "( ... )" }
|
||||
|
||||
final override Stmt getStmt(int n) { toGenerated(result) = g.getChild(n) }
|
||||
}
|
||||
|
||||
@@ -94,10 +94,10 @@ private module Cached {
|
||||
not strictcount(int i | exists(g.getParent().(Generated::LeftAssignmentList).getChild(i))) = 1
|
||||
} or
|
||||
TDivExpr(Generated::Binary g) { g instanceof @binary_slash } or
|
||||
TDo(Generated::Do g) { exists(g.getChild(_)) } or
|
||||
TDo(Generated::Do g) or
|
||||
TDoBlock(Generated::DoBlock g) { not g.getParent() instanceof Generated::Lambda } or
|
||||
TElementReference(Generated::ElementReference g) or
|
||||
TElse(Generated::Else g) { exists(g.getChild(_)) } or
|
||||
TElse(Generated::Else g) or
|
||||
TElsif(Generated::Elsif g) or
|
||||
TEmptyStmt(Generated::EmptyStatement g) or
|
||||
TEndBlock(Generated::EndBlock g) or
|
||||
@@ -198,7 +198,7 @@ private module Cached {
|
||||
TSubshellLiteral(Generated::Subshell g) or
|
||||
TSymbolArrayLiteral(Generated::SymbolArray g) or
|
||||
TTernaryIfExpr(Generated::Conditional g) or
|
||||
TThen(Generated::Then g) { exists(g.getChild(_)) } or
|
||||
TThen(Generated::Then g) or
|
||||
TTokenConstantAccess(Generated::Constant g) {
|
||||
// A tree-sitter `constant` token is a read of that constant in any context
|
||||
// where an identifier would be a vcall.
|
||||
|
||||
@@ -643,17 +643,10 @@ module Trees {
|
||||
|
||||
final override predicate first(AstNode first) { first(this.getCondition(), first) }
|
||||
|
||||
private AstNode getConditionSucc() {
|
||||
result = this.getBody()
|
||||
or
|
||||
not exists(this.getBody()) and
|
||||
result = this.getCondition()
|
||||
}
|
||||
|
||||
final override predicate succ(AstNode pred, AstNode succ, Completion c) {
|
||||
last(this.getCondition(), pred, c) and
|
||||
this.entersLoopWhenConditionIs(c.(BooleanCompletion).getValue()) and
|
||||
first(this.getConditionSucc(), succ)
|
||||
first(this.getBody(), succ)
|
||||
or
|
||||
last(this.getBody(), pred, c) and
|
||||
first(this.getCondition(), succ) and
|
||||
@@ -1117,21 +1110,6 @@ module Trees {
|
||||
}
|
||||
}
|
||||
|
||||
private class TSimpleHiddenStmtSequenceTree =
|
||||
ASTInternal::TElse or ASTInternal::TThen or ASTInternal::TDo;
|
||||
|
||||
private class SimpleHiddenStmtSequenceTree extends StmtSequenceTree, TSimpleHiddenStmtSequenceTree {
|
||||
final override predicate propagatesAbnormal(AstNode child) { child = this.getAStmt() }
|
||||
|
||||
final override predicate first(AstNode first) { first(this.getStmt(0), first) }
|
||||
|
||||
final override predicate last(AstNode last, Completion c) { last(this.getLastStmt(), last, c) }
|
||||
|
||||
final override predicate succ(AstNode pred, AstNode succ, Completion c) {
|
||||
StmtSequenceTree.super.succ(pred, succ, c)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Control-flow tree for any pre-order StmtSequence that doesn't have a more
|
||||
* specific implementation.
|
||||
@@ -1144,8 +1122,7 @@ module Trees {
|
||||
not this instanceof EndBlock and
|
||||
not this instanceof StringInterpolationComponent and
|
||||
not this instanceof Block and
|
||||
not this instanceof ParenthesizedExpr and
|
||||
not this instanceof TSimpleHiddenStmtSequenceTree
|
||||
not this instanceof ParenthesizedExpr
|
||||
}
|
||||
|
||||
final override predicate propagatesAbnormal(AstNode child) { child = this.getAStmt() }
|
||||
|
||||
@@ -43,9 +43,9 @@ calls/calls.rb:
|
||||
# 46| getStmt: [MethodCall] call to foo
|
||||
# 47| getStmt: [MethodCall] call to foo
|
||||
# 47| getReceiver: [ConstantReadAccess] X
|
||||
# 50| getStmt: [ParenthesizedExpr] (call to foo)
|
||||
# 50| getStmt: [ParenthesizedExpr] ( ... )
|
||||
# 50| getStmt: [MethodCall] call to foo
|
||||
# 51| getStmt: [ParenthesizedExpr] (call to foo)
|
||||
# 51| getStmt: [ParenthesizedExpr] ( ... )
|
||||
# 51| getStmt: [MethodCall] call to foo
|
||||
# 51| getReceiver: [ConstantReadAccess] X
|
||||
# 54| getStmt: [MethodCall] call to some_func
|
||||
@@ -117,7 +117,7 @@ calls/calls.rb:
|
||||
# 106| getValue: [MethodCall] call to foo
|
||||
# 107| getBranch: [WhenExpr] when ...
|
||||
# 107| getPattern: [MethodCall] call to bar
|
||||
# 107| getBody: [StmtSequence] call to baz
|
||||
# 107| getBody: [StmtSequence] then ...
|
||||
# 108| getStmt: [MethodCall] call to baz
|
||||
# 110| getStmt: [CaseExpr] case ...
|
||||
# 110| getValue: [MethodCall] call to foo
|
||||
@@ -125,7 +125,7 @@ calls/calls.rb:
|
||||
# 111| getBranch: [WhenExpr] when ...
|
||||
# 111| getPattern: [MethodCall] call to bar
|
||||
# 111| getReceiver: [ConstantReadAccess] X
|
||||
# 111| getBody: [StmtSequence] call to baz
|
||||
# 111| getBody: [StmtSequence] then ...
|
||||
# 112| getStmt: [MethodCall] call to baz
|
||||
# 112| getReceiver: [ConstantReadAccess] X
|
||||
# 116| getStmt: [Class] MyClass
|
||||
@@ -189,27 +189,27 @@ calls/calls.rb:
|
||||
# 167| getReceiver: [ConstantReadAccess] X
|
||||
# 170| getStmt: [IfExpr] if ...
|
||||
# 170| getCondition: [MethodCall] call to foo
|
||||
# 170| getBranch/getThen: [StmtSequence] call to wibble
|
||||
# 170| getBranch/getThen: [StmtSequence] then ...
|
||||
# 171| getStmt: [MethodCall] call to wibble
|
||||
# 172| getBranch/getElse: [IfExpr] elsif ...
|
||||
# 172| getCondition: [MethodCall] call to bar
|
||||
# 172| getBranch/getThen: [StmtSequence] call to wobble
|
||||
# 172| getBranch/getThen: [StmtSequence] then ...
|
||||
# 173| getStmt: [MethodCall] call to wobble
|
||||
# 174| getBranch/getElse: [StmtSequence] call to wabble
|
||||
# 174| getBranch/getElse: [StmtSequence] else ...
|
||||
# 175| getStmt: [MethodCall] call to wabble
|
||||
# 177| getStmt: [IfExpr] if ...
|
||||
# 177| getCondition: [MethodCall] call to foo
|
||||
# 177| getReceiver: [ConstantReadAccess] X
|
||||
# 177| getBranch/getThen: [StmtSequence] call to wibble
|
||||
# 177| getBranch/getThen: [StmtSequence] then ...
|
||||
# 178| getStmt: [MethodCall] call to wibble
|
||||
# 178| getReceiver: [ConstantReadAccess] X
|
||||
# 179| getBranch/getElse: [IfExpr] elsif ...
|
||||
# 179| getCondition: [MethodCall] call to bar
|
||||
# 179| getReceiver: [ConstantReadAccess] X
|
||||
# 179| getBranch/getThen: [StmtSequence] call to wobble
|
||||
# 179| getBranch/getThen: [StmtSequence] then ...
|
||||
# 180| getStmt: [MethodCall] call to wobble
|
||||
# 180| getReceiver: [ConstantReadAccess] X
|
||||
# 181| getBranch/getElse: [StmtSequence] call to wabble
|
||||
# 181| getBranch/getElse: [StmtSequence] else ...
|
||||
# 182| getStmt: [MethodCall] call to wabble
|
||||
# 182| getReceiver: [ConstantReadAccess] X
|
||||
# 186| getStmt: [IfModifierExpr] ... if ...
|
||||
@@ -222,12 +222,12 @@ calls/calls.rb:
|
||||
# 187| getReceiver: [ConstantReadAccess] X
|
||||
# 190| getStmt: [UnlessExpr] unless ...
|
||||
# 190| getCondition: [MethodCall] call to foo
|
||||
# 190| getBranch/getThen: [StmtSequence] call to bar
|
||||
# 190| getBranch/getThen: [StmtSequence] then ...
|
||||
# 191| getStmt: [MethodCall] call to bar
|
||||
# 193| getStmt: [UnlessExpr] unless ...
|
||||
# 193| getCondition: [MethodCall] call to foo
|
||||
# 193| getReceiver: [ConstantReadAccess] X
|
||||
# 193| getBranch/getThen: [StmtSequence] call to bar
|
||||
# 193| getBranch/getThen: [StmtSequence] then ...
|
||||
# 194| getStmt: [MethodCall] call to bar
|
||||
# 194| getReceiver: [ConstantReadAccess] X
|
||||
# 198| getStmt: [UnlessModifierExpr] ... unless ...
|
||||
@@ -240,12 +240,12 @@ calls/calls.rb:
|
||||
# 199| getReceiver: [ConstantReadAccess] X
|
||||
# 202| getStmt: [WhileExpr] while ...
|
||||
# 202| getCondition: [MethodCall] call to foo
|
||||
# 202| getBody: [StmtSequence] call to bar
|
||||
# 202| getBody: [StmtSequence] do ...
|
||||
# 203| getStmt: [MethodCall] call to bar
|
||||
# 205| getStmt: [WhileExpr] while ...
|
||||
# 205| getCondition: [MethodCall] call to foo
|
||||
# 205| getReceiver: [ConstantReadAccess] X
|
||||
# 205| getBody: [StmtSequence] call to bar
|
||||
# 205| getBody: [StmtSequence] do ...
|
||||
# 206| getStmt: [MethodCall] call to bar
|
||||
# 206| getReceiver: [ConstantReadAccess] X
|
||||
# 210| getStmt: [WhileModifierExpr] ... while ...
|
||||
@@ -258,12 +258,12 @@ calls/calls.rb:
|
||||
# 211| getReceiver: [ConstantReadAccess] X
|
||||
# 214| getStmt: [UntilExpr] until ...
|
||||
# 214| getCondition: [MethodCall] call to foo
|
||||
# 214| getBody: [StmtSequence] call to bar
|
||||
# 214| getBody: [StmtSequence] do ...
|
||||
# 215| getStmt: [MethodCall] call to bar
|
||||
# 217| getStmt: [UntilExpr] until ...
|
||||
# 217| getCondition: [MethodCall] call to foo
|
||||
# 217| getReceiver: [ConstantReadAccess] X
|
||||
# 217| getBody: [StmtSequence] call to bar
|
||||
# 217| getBody: [StmtSequence] do ...
|
||||
# 218| getStmt: [MethodCall] call to bar
|
||||
# 218| getReceiver: [ConstantReadAccess] X
|
||||
# 222| getStmt: [UntilModifierExpr] ... until ...
|
||||
@@ -278,14 +278,14 @@ calls/calls.rb:
|
||||
# 226| getPattern: [LocalVariableAccess] x
|
||||
# 226| <in>: [???] In
|
||||
# 226| getValue: [MethodCall] call to bar
|
||||
# 226| getBody: [StmtSequence] call to baz
|
||||
# 226| getBody: [StmtSequence] do ...
|
||||
# 227| getStmt: [MethodCall] call to baz
|
||||
# 229| getStmt: [ForExpr] for ... in ...
|
||||
# 229| getPattern: [LocalVariableAccess] x
|
||||
# 229| <in>: [???] In
|
||||
# 229| getValue: [MethodCall] call to bar
|
||||
# 229| getReceiver: [ConstantReadAccess] X
|
||||
# 229| getBody: [StmtSequence] call to baz
|
||||
# 229| getBody: [StmtSequence] do ...
|
||||
# 230| getStmt: [MethodCall] call to baz
|
||||
# 230| getReceiver: [ConstantReadAccess] X
|
||||
# 234| getStmt: [ElementReference] ...[...]
|
||||
@@ -492,33 +492,33 @@ control/cases.rb:
|
||||
# 8| getValue: [LocalVariableAccess] a
|
||||
# 9| getBranch: [WhenExpr] when ...
|
||||
# 9| getPattern: [LocalVariableAccess] b
|
||||
# 9| getBody: [StmtSequence] 100
|
||||
# 9| getBody: [StmtSequence] then ...
|
||||
# 10| getStmt: [IntegerLiteral] 100
|
||||
# 11| getBranch: [WhenExpr] when ...
|
||||
# 11| getPattern: [LocalVariableAccess] c
|
||||
# 11| getPattern: [LocalVariableAccess] d
|
||||
# 11| getBody: [StmtSequence] 200
|
||||
# 11| getBody: [StmtSequence] then ...
|
||||
# 12| getStmt: [IntegerLiteral] 200
|
||||
# 13| getBranch: [StmtSequence] 300
|
||||
# 13| getBranch: [StmtSequence] else ...
|
||||
# 14| getStmt: [IntegerLiteral] 300
|
||||
# 18| getStmt: [CaseExpr] case ...
|
||||
# 19| getBranch: [WhenExpr] when ...
|
||||
# 19| getPattern: [GTExpr] ... > ...
|
||||
# 19| getAnOperand/getGreaterOperand/getLeftOperand: [LocalVariableAccess] a
|
||||
# 19| getAnOperand/getLesserOperand/getRightOperand: [LocalVariableAccess] b
|
||||
# 19| getBody: [StmtSequence] 10
|
||||
# 19| getBody: [StmtSequence] then ...
|
||||
# 19| getStmt: [IntegerLiteral] 10
|
||||
# 20| getBranch: [WhenExpr] when ...
|
||||
# 20| getPattern: [EqExpr] ... == ...
|
||||
# 20| getAnOperand/getLeftOperand: [LocalVariableAccess] a
|
||||
# 20| getAnOperand/getRightOperand: [LocalVariableAccess] b
|
||||
# 20| getBody: [StmtSequence] 20
|
||||
# 20| getBody: [StmtSequence] then ...
|
||||
# 20| getStmt: [IntegerLiteral] 20
|
||||
# 21| getBranch: [WhenExpr] when ...
|
||||
# 21| getPattern: [LTExpr] ... < ...
|
||||
# 21| getAnOperand/getLeftOperand/getLesserOperand: [LocalVariableAccess] a
|
||||
# 21| getAnOperand/getGreaterOperand/getRightOperand: [LocalVariableAccess] b
|
||||
# 21| getBody: [StmtSequence] 30
|
||||
# 21| getBody: [StmtSequence] then ...
|
||||
# 21| getStmt: [IntegerLiteral] 30
|
||||
modules/classes.rb:
|
||||
# 2| [Toplevel] classes.rb
|
||||
@@ -589,61 +589,61 @@ control/conditionals.rb:
|
||||
# 10| getCondition: [GTExpr] ... > ...
|
||||
# 10| getAnOperand/getGreaterOperand/getLeftOperand: [LocalVariableAccess] a
|
||||
# 10| getAnOperand/getLesserOperand/getRightOperand: [LocalVariableAccess] b
|
||||
# 10| getBranch/getThen: [StmtSequence] c
|
||||
# 10| getBranch/getThen: [StmtSequence] then ...
|
||||
# 11| getStmt: [LocalVariableAccess] c
|
||||
# 15| getStmt: [IfExpr] if ...
|
||||
# 15| getCondition: [EqExpr] ... == ...
|
||||
# 15| getAnOperand/getLeftOperand: [LocalVariableAccess] a
|
||||
# 15| getAnOperand/getRightOperand: [LocalVariableAccess] b
|
||||
# 15| getBranch/getThen: [StmtSequence] c
|
||||
# 15| getBranch/getThen: [StmtSequence] then ...
|
||||
# 16| getStmt: [LocalVariableAccess] c
|
||||
# 17| getBranch/getElse: [StmtSequence] d
|
||||
# 17| getBranch/getElse: [StmtSequence] else ...
|
||||
# 18| getStmt: [LocalVariableAccess] d
|
||||
# 22| getStmt: [IfExpr] if ...
|
||||
# 22| getCondition: [EqExpr] ... == ...
|
||||
# 22| getAnOperand/getLeftOperand: [LocalVariableAccess] a
|
||||
# 22| getAnOperand/getRightOperand: [IntegerLiteral] 0
|
||||
# 22| getBranch/getThen: [StmtSequence] c
|
||||
# 22| getBranch/getThen: [StmtSequence] then ...
|
||||
# 23| getStmt: [LocalVariableAccess] c
|
||||
# 24| getBranch/getElse: [IfExpr] elsif ...
|
||||
# 24| getCondition: [EqExpr] ... == ...
|
||||
# 24| getAnOperand/getLeftOperand: [LocalVariableAccess] a
|
||||
# 24| getAnOperand/getRightOperand: [IntegerLiteral] 1
|
||||
# 24| getBranch/getThen: [StmtSequence] d
|
||||
# 24| getBranch/getThen: [StmtSequence] then ...
|
||||
# 25| getStmt: [LocalVariableAccess] d
|
||||
# 26| getBranch/getElse: [IfExpr] elsif ...
|
||||
# 26| getCondition: [EqExpr] ... == ...
|
||||
# 26| getAnOperand/getLeftOperand: [LocalVariableAccess] a
|
||||
# 26| getAnOperand/getRightOperand: [IntegerLiteral] 2
|
||||
# 26| getBranch/getThen: [StmtSequence] e
|
||||
# 26| getBranch/getThen: [StmtSequence] then ...
|
||||
# 27| getStmt: [LocalVariableAccess] e
|
||||
# 28| getBranch/getElse: [StmtSequence] f
|
||||
# 28| getBranch/getElse: [StmtSequence] else ...
|
||||
# 29| getStmt: [LocalVariableAccess] f
|
||||
# 33| getStmt: [IfExpr] if ...
|
||||
# 33| getCondition: [EqExpr] ... == ...
|
||||
# 33| getAnOperand/getLeftOperand: [LocalVariableAccess] a
|
||||
# 33| getAnOperand/getRightOperand: [IntegerLiteral] 0
|
||||
# 33| getBranch/getThen: [StmtSequence] b
|
||||
# 33| getBranch/getThen: [StmtSequence] then ...
|
||||
# 34| getStmt: [LocalVariableAccess] b
|
||||
# 35| getBranch/getElse: [IfExpr] elsif ...
|
||||
# 35| getCondition: [EqExpr] ... == ...
|
||||
# 35| getAnOperand/getLeftOperand: [LocalVariableAccess] a
|
||||
# 35| getAnOperand/getRightOperand: [IntegerLiteral] 1
|
||||
# 35| getBranch/getThen: [StmtSequence] c
|
||||
# 35| getBranch/getThen: [StmtSequence] then ...
|
||||
# 36| getStmt: [LocalVariableAccess] c
|
||||
# 40| getStmt: [UnlessExpr] unless ...
|
||||
# 40| getCondition: [GTExpr] ... > ...
|
||||
# 40| getAnOperand/getGreaterOperand/getLeftOperand: [LocalVariableAccess] a
|
||||
# 40| getAnOperand/getLesserOperand/getRightOperand: [LocalVariableAccess] b
|
||||
# 40| getBranch/getThen: [StmtSequence] c
|
||||
# 40| getBranch/getThen: [StmtSequence] then ...
|
||||
# 41| getStmt: [LocalVariableAccess] c
|
||||
# 45| getStmt: [UnlessExpr] unless ...
|
||||
# 45| getCondition: [EqExpr] ... == ...
|
||||
# 45| getAnOperand/getLeftOperand: [LocalVariableAccess] a
|
||||
# 45| getAnOperand/getRightOperand: [LocalVariableAccess] b
|
||||
# 45| getBranch/getThen: [StmtSequence] c
|
||||
# 45| getBranch/getThen: [StmtSequence] then ...
|
||||
# 46| getStmt: [LocalVariableAccess] c
|
||||
# 47| getBranch/getElse: [StmtSequence] d
|
||||
# 47| getBranch/getElse: [StmtSequence] else ...
|
||||
# 48| getStmt: [LocalVariableAccess] d
|
||||
# 52| getStmt: [IfModifierExpr] ... if ...
|
||||
# 52| getBody/getBranch: [AssignExpr] ... = ...
|
||||
@@ -675,13 +675,15 @@ control/conditionals.rb:
|
||||
# 61| getCondition: [GTExpr] ... > ...
|
||||
# 61| getAnOperand/getGreaterOperand/getLeftOperand: [LocalVariableAccess] a
|
||||
# 61| getAnOperand/getLesserOperand/getRightOperand: [LocalVariableAccess] b
|
||||
# 61| getBranch/getThen: [StmtSequence] c
|
||||
# 61| getBranch/getThen: [StmtSequence] then ...
|
||||
# 62| getStmt: [LocalVariableAccess] c
|
||||
# 63| getBranch/getElse: [StmtSequence] else ...
|
||||
# 67| getStmt: [IfExpr] if ...
|
||||
# 67| getCondition: [GTExpr] ... > ...
|
||||
# 67| getAnOperand/getGreaterOperand/getLeftOperand: [LocalVariableAccess] a
|
||||
# 67| getAnOperand/getLesserOperand/getRightOperand: [LocalVariableAccess] b
|
||||
# 68| getBranch/getElse: [StmtSequence] c
|
||||
# 67| getBranch/getThen: [StmtSequence] then ...
|
||||
# 68| getBranch/getElse: [StmtSequence] else ...
|
||||
# 69| getStmt: [LocalVariableAccess] c
|
||||
constants/constants.rb:
|
||||
# 1| [Toplevel] constants.rb
|
||||
@@ -985,31 +987,31 @@ literals/literals.rb:
|
||||
# 114| getValue: [IntegerLiteral] 7
|
||||
# 114| getElement: [HashSplatArgument] **...
|
||||
# 114| getValue: [MethodCall] call to bar
|
||||
# 117| getStmt: [ParenthesizedExpr] (_ .. _)
|
||||
# 117| getStmt: [ParenthesizedExpr] ( ... )
|
||||
# 117| getStmt: [RangeLiteral] _ .. _
|
||||
# 117| getBegin: [IntegerLiteral] 1
|
||||
# 117| getEnd: [IntegerLiteral] 10
|
||||
# 118| getStmt: [ParenthesizedExpr] (_ ... _)
|
||||
# 118| getStmt: [ParenthesizedExpr] ( ... )
|
||||
# 118| getStmt: [RangeLiteral] _ ... _
|
||||
# 118| getBegin: [IntegerLiteral] 1
|
||||
# 118| getEnd: [IntegerLiteral] 10
|
||||
# 119| getStmt: [ParenthesizedExpr] (_ .. _)
|
||||
# 119| getStmt: [ParenthesizedExpr] ( ... )
|
||||
# 119| getStmt: [RangeLiteral] _ .. _
|
||||
# 119| getBegin: [IntegerLiteral] 1
|
||||
# 119| getEnd: [IntegerLiteral] 0
|
||||
# 120| getStmt: [ParenthesizedExpr] (_ .. _)
|
||||
# 120| getStmt: [ParenthesizedExpr] ( ... )
|
||||
# 120| getStmt: [RangeLiteral] _ .. _
|
||||
# 120| getBegin: [MethodCall] call to start
|
||||
# 120| getEnd: [AddExpr] ... + ...
|
||||
# 120| getAnOperand/getLeftOperand: [IntegerLiteral] 2
|
||||
# 120| getAnOperand/getRightOperand: [IntegerLiteral] 3
|
||||
# 121| getStmt: [ParenthesizedExpr] (_ .. _)
|
||||
# 121| getStmt: [ParenthesizedExpr] ( ... )
|
||||
# 121| getStmt: [RangeLiteral] _ .. _
|
||||
# 121| getBegin: [IntegerLiteral] 1
|
||||
# 122| getStmt: [ParenthesizedExpr] (_ .. _)
|
||||
# 122| getStmt: [ParenthesizedExpr] ( ... )
|
||||
# 122| getStmt: [RangeLiteral] _ .. _
|
||||
# 122| getEnd: [IntegerLiteral] 1
|
||||
# 123| getStmt: [ParenthesizedExpr] (... - ...)
|
||||
# 123| getStmt: [ParenthesizedExpr] ( ... )
|
||||
# 123| getStmt: [SubExpr] ... - ...
|
||||
# 123| getAnOperand/getLeftOperand: [RangeLiteral] _ .. _
|
||||
# 123| getBegin: [IntegerLiteral] 0
|
||||
@@ -1156,7 +1158,7 @@ control/loops.rb:
|
||||
# 9| getValue: [RangeLiteral] _ .. _
|
||||
# 9| getBegin: [IntegerLiteral] 1
|
||||
# 9| getEnd: [IntegerLiteral] 10
|
||||
# 9| getBody: [StmtSequence] ...; ...
|
||||
# 9| getBody: [StmtSequence] do ...
|
||||
# 10| getStmt: [AssignAddExpr] ... += ...
|
||||
# 10| getAnOperand/getLeftOperand: [LocalVariableAccess] sum
|
||||
# 10| getAnOperand/getRightOperand: [LocalVariableAccess] n
|
||||
@@ -1169,7 +1171,7 @@ control/loops.rb:
|
||||
# 16| getValue: [RangeLiteral] _ .. _
|
||||
# 16| getBegin: [IntegerLiteral] 1
|
||||
# 16| getEnd: [IntegerLiteral] 10
|
||||
# 16| getBody: [StmtSequence] ...; ...
|
||||
# 16| getBody: [StmtSequence] do ...
|
||||
# 17| getStmt: [AssignAddExpr] ... += ...
|
||||
# 17| getAnOperand/getLeftOperand: [LocalVariableAccess] sum
|
||||
# 17| getAnOperand/getRightOperand: [LocalVariableAccess] n
|
||||
@@ -1188,7 +1190,7 @@ control/loops.rb:
|
||||
# 22| getElement: [Pair] Pair
|
||||
# 22| getKey: [SymbolLiteral] :bar
|
||||
# 22| getValue: [IntegerLiteral] 1
|
||||
# 22| getBody: [StmtSequence] ...; ...
|
||||
# 22| getBody: [StmtSequence] do ...
|
||||
# 23| getStmt: [AssignAddExpr] ... += ...
|
||||
# 23| getAnOperand/getLeftOperand: [LocalVariableAccess] sum
|
||||
# 23| getAnOperand/getRightOperand: [LocalVariableAccess] value
|
||||
@@ -1207,7 +1209,7 @@ control/loops.rb:
|
||||
# 28| getElement: [Pair] Pair
|
||||
# 28| getKey: [SymbolLiteral] :bar
|
||||
# 28| getValue: [IntegerLiteral] 1
|
||||
# 28| getBody: [StmtSequence] ...; ...
|
||||
# 28| getBody: [StmtSequence] do ...
|
||||
# 29| getStmt: [AssignAddExpr] ... += ...
|
||||
# 29| getAnOperand/getLeftOperand: [LocalVariableAccess] sum
|
||||
# 29| getAnOperand/getRightOperand: [LocalVariableAccess] value
|
||||
@@ -1219,7 +1221,7 @@ control/loops.rb:
|
||||
# 35| getCondition: [LTExpr] ... < ...
|
||||
# 35| getAnOperand/getLeftOperand/getLesserOperand: [LocalVariableAccess] x
|
||||
# 35| getAnOperand/getGreaterOperand/getRightOperand: [LocalVariableAccess] y
|
||||
# 35| getBody: [StmtSequence] ...; ...
|
||||
# 35| getBody: [StmtSequence] do ...
|
||||
# 36| getStmt: [AssignAddExpr] ... += ...
|
||||
# 36| getAnOperand/getLeftOperand: [LocalVariableAccess] x
|
||||
# 36| getAnOperand/getRightOperand: [IntegerLiteral] 1
|
||||
@@ -1231,7 +1233,7 @@ control/loops.rb:
|
||||
# 42| getCondition: [LTExpr] ... < ...
|
||||
# 42| getAnOperand/getLeftOperand/getLesserOperand: [LocalVariableAccess] x
|
||||
# 42| getAnOperand/getGreaterOperand/getRightOperand: [LocalVariableAccess] y
|
||||
# 42| getBody: [StmtSequence] ...; ...
|
||||
# 42| getBody: [StmtSequence] do ...
|
||||
# 43| getStmt: [AssignAddExpr] ... += ...
|
||||
# 43| getAnOperand/getLeftOperand: [LocalVariableAccess] x
|
||||
# 43| getAnOperand/getRightOperand: [IntegerLiteral] 1
|
||||
@@ -1249,7 +1251,7 @@ control/loops.rb:
|
||||
# 51| getCondition: [EqExpr] ... == ...
|
||||
# 51| getAnOperand/getLeftOperand: [LocalVariableAccess] x
|
||||
# 51| getAnOperand/getRightOperand: [LocalVariableAccess] y
|
||||
# 51| getBody: [StmtSequence] ...; ...
|
||||
# 51| getBody: [StmtSequence] do ...
|
||||
# 52| getStmt: [AssignAddExpr] ... += ...
|
||||
# 52| getAnOperand/getLeftOperand: [LocalVariableAccess] x
|
||||
# 52| getAnOperand/getRightOperand: [IntegerLiteral] 1
|
||||
@@ -1260,7 +1262,7 @@ control/loops.rb:
|
||||
# 57| getCondition: [GTExpr] ... > ...
|
||||
# 57| getAnOperand/getGreaterOperand/getLeftOperand: [LocalVariableAccess] x
|
||||
# 57| getAnOperand/getLesserOperand/getRightOperand: [LocalVariableAccess] y
|
||||
# 57| getBody: [StmtSequence] ...; ...
|
||||
# 57| getBody: [StmtSequence] do ...
|
||||
# 58| getStmt: [AssignAddExpr] ... += ...
|
||||
# 58| getAnOperand/getLeftOperand: [LocalVariableAccess] x
|
||||
# 58| getAnOperand/getRightOperand: [IntegerLiteral] 1
|
||||
@@ -1278,6 +1280,7 @@ control/loops.rb:
|
||||
# 66| getCondition: [LTExpr] ... < ...
|
||||
# 66| getAnOperand/getLeftOperand/getLesserOperand: [LocalVariableAccess] x
|
||||
# 66| getAnOperand/getGreaterOperand/getRightOperand: [LocalVariableAccess] y
|
||||
# 66| getBody: [StmtSequence] do ...
|
||||
misc/misc.rb:
|
||||
# 1| [Toplevel] misc.rb
|
||||
# 1| getStmt: [AssignExpr] ... = ...
|
||||
|
||||
@@ -3,20 +3,20 @@ caseValues
|
||||
caseNoValues
|
||||
| cases.rb:18:1:22:3 | case ... |
|
||||
caseElseBranches
|
||||
| cases.rb:8:1:15:3 | case ... | cases.rb:13:1:14:7 | 300 |
|
||||
| cases.rb:8:1:15:3 | case ... | cases.rb:13:1:14:7 | else ... |
|
||||
caseNoElseBranches
|
||||
| cases.rb:18:1:22:3 | case ... |
|
||||
caseWhenBranches
|
||||
| cases.rb:8:1:15:3 | case ... | cases.rb:9:1:10:7 | when ... | 0 | cases.rb:9:6:9:6 | b | cases.rb:9:7:10:7 | 100 |
|
||||
| cases.rb:8:1:15:3 | case ... | cases.rb:11:1:12:7 | when ... | 0 | cases.rb:11:6:11:6 | c | cases.rb:11:10:12:7 | 200 |
|
||||
| cases.rb:8:1:15:3 | case ... | cases.rb:11:1:12:7 | when ... | 1 | cases.rb:11:9:11:9 | d | cases.rb:11:10:12:7 | 200 |
|
||||
| cases.rb:18:1:22:3 | case ... | cases.rb:19:1:19:19 | when ... | 0 | cases.rb:19:6:19:10 | ... > ... | cases.rb:19:13:19:19 | 10 |
|
||||
| cases.rb:18:1:22:3 | case ... | cases.rb:20:1:20:19 | when ... | 0 | cases.rb:20:6:20:11 | ... == ... | cases.rb:20:13:20:19 | 20 |
|
||||
| cases.rb:18:1:22:3 | case ... | cases.rb:21:1:21:19 | when ... | 0 | cases.rb:21:6:21:10 | ... < ... | cases.rb:21:13:21:19 | 30 |
|
||||
| cases.rb:8:1:15:3 | case ... | cases.rb:9:1:10:7 | when ... | 0 | cases.rb:9:6:9:6 | b | cases.rb:9:7:10:7 | then ... |
|
||||
| cases.rb:8:1:15:3 | case ... | cases.rb:11:1:12:7 | when ... | 0 | cases.rb:11:6:11:6 | c | cases.rb:11:10:12:7 | then ... |
|
||||
| cases.rb:8:1:15:3 | case ... | cases.rb:11:1:12:7 | when ... | 1 | cases.rb:11:9:11:9 | d | cases.rb:11:10:12:7 | then ... |
|
||||
| cases.rb:18:1:22:3 | case ... | cases.rb:19:1:19:19 | when ... | 0 | cases.rb:19:6:19:10 | ... > ... | cases.rb:19:13:19:19 | then ... |
|
||||
| cases.rb:18:1:22:3 | case ... | cases.rb:20:1:20:19 | when ... | 0 | cases.rb:20:6:20:11 | ... == ... | cases.rb:20:13:20:19 | then ... |
|
||||
| cases.rb:18:1:22:3 | case ... | cases.rb:21:1:21:19 | when ... | 0 | cases.rb:21:6:21:10 | ... < ... | cases.rb:21:13:21:19 | then ... |
|
||||
caseAllBranches
|
||||
| cases.rb:8:1:15:3 | case ... | 0 | cases.rb:9:1:10:7 | when ... |
|
||||
| cases.rb:8:1:15:3 | case ... | 1 | cases.rb:11:1:12:7 | when ... |
|
||||
| cases.rb:8:1:15:3 | case ... | 2 | cases.rb:13:1:14:7 | 300 |
|
||||
| cases.rb:8:1:15:3 | case ... | 2 | cases.rb:13:1:14:7 | else ... |
|
||||
| cases.rb:18:1:22:3 | case ... | 0 | cases.rb:19:1:19:19 | when ... |
|
||||
| cases.rb:18:1:22:3 | case ... | 1 | cases.rb:20:1:20:19 | when ... |
|
||||
| cases.rb:18:1:22:3 | case ... | 2 | cases.rb:21:1:21:19 | when ... |
|
||||
|
||||
@@ -1,37 +1,40 @@
|
||||
conditionalExprs
|
||||
| conditionals.rb:10:1:12:3 | if ... | IfExpr | conditionals.rb:10:4:10:8 | ... > ... | conditionals.rb:10:10:11:5 | c | true |
|
||||
| conditionals.rb:15:1:19:3 | if ... | IfExpr | conditionals.rb:15:4:15:9 | ... == ... | conditionals.rb:15:10:16:5 | c | true |
|
||||
| conditionals.rb:15:1:19:3 | if ... | IfExpr | conditionals.rb:15:4:15:9 | ... == ... | conditionals.rb:17:1:18:5 | d | false |
|
||||
| conditionals.rb:22:1:30:3 | if ... | IfExpr | conditionals.rb:22:4:22:9 | ... == ... | conditionals.rb:22:11:23:5 | c | true |
|
||||
| conditionals.rb:10:1:12:3 | if ... | IfExpr | conditionals.rb:10:4:10:8 | ... > ... | conditionals.rb:10:10:11:5 | then ... | true |
|
||||
| conditionals.rb:15:1:19:3 | if ... | IfExpr | conditionals.rb:15:4:15:9 | ... == ... | conditionals.rb:15:10:16:5 | then ... | true |
|
||||
| conditionals.rb:15:1:19:3 | if ... | IfExpr | conditionals.rb:15:4:15:9 | ... == ... | conditionals.rb:17:1:18:5 | else ... | false |
|
||||
| conditionals.rb:22:1:30:3 | if ... | IfExpr | conditionals.rb:22:4:22:9 | ... == ... | conditionals.rb:22:11:23:5 | then ... | true |
|
||||
| conditionals.rb:22:1:30:3 | if ... | IfExpr | conditionals.rb:22:4:22:9 | ... == ... | conditionals.rb:24:1:29:5 | elsif ... | false |
|
||||
| conditionals.rb:24:1:29:5 | elsif ... | IfExpr | conditionals.rb:24:7:24:12 | ... == ... | conditionals.rb:24:14:25:5 | d | true |
|
||||
| conditionals.rb:24:1:29:5 | elsif ... | IfExpr | conditionals.rb:24:7:24:12 | ... == ... | conditionals.rb:24:14:25:5 | then ... | true |
|
||||
| conditionals.rb:24:1:29:5 | elsif ... | IfExpr | conditionals.rb:24:7:24:12 | ... == ... | conditionals.rb:26:1:29:5 | elsif ... | false |
|
||||
| conditionals.rb:26:1:29:5 | elsif ... | IfExpr | conditionals.rb:26:7:26:12 | ... == ... | conditionals.rb:26:14:27:5 | e | true |
|
||||
| conditionals.rb:26:1:29:5 | elsif ... | IfExpr | conditionals.rb:26:7:26:12 | ... == ... | conditionals.rb:28:1:29:5 | f | false |
|
||||
| conditionals.rb:33:1:37:3 | if ... | IfExpr | conditionals.rb:33:4:33:9 | ... == ... | conditionals.rb:33:10:34:5 | b | true |
|
||||
| conditionals.rb:26:1:29:5 | elsif ... | IfExpr | conditionals.rb:26:7:26:12 | ... == ... | conditionals.rb:26:14:27:5 | then ... | true |
|
||||
| conditionals.rb:26:1:29:5 | elsif ... | IfExpr | conditionals.rb:26:7:26:12 | ... == ... | conditionals.rb:28:1:29:5 | else ... | false |
|
||||
| conditionals.rb:33:1:37:3 | if ... | IfExpr | conditionals.rb:33:4:33:9 | ... == ... | conditionals.rb:33:10:34:5 | then ... | true |
|
||||
| conditionals.rb:33:1:37:3 | if ... | IfExpr | conditionals.rb:33:4:33:9 | ... == ... | conditionals.rb:35:1:36:5 | elsif ... | false |
|
||||
| conditionals.rb:35:1:36:5 | elsif ... | IfExpr | conditionals.rb:35:7:35:12 | ... == ... | conditionals.rb:35:13:36:5 | c | true |
|
||||
| conditionals.rb:40:1:42:3 | unless ... | UnlessExpr | conditionals.rb:40:8:40:12 | ... > ... | conditionals.rb:40:14:41:5 | c | false |
|
||||
| conditionals.rb:45:1:49:3 | unless ... | UnlessExpr | conditionals.rb:45:8:45:13 | ... == ... | conditionals.rb:45:14:46:5 | c | false |
|
||||
| conditionals.rb:45:1:49:3 | unless ... | UnlessExpr | conditionals.rb:45:8:45:13 | ... == ... | conditionals.rb:47:1:48:5 | d | true |
|
||||
| conditionals.rb:35:1:36:5 | elsif ... | IfExpr | conditionals.rb:35:7:35:12 | ... == ... | conditionals.rb:35:13:36:5 | then ... | true |
|
||||
| conditionals.rb:40:1:42:3 | unless ... | UnlessExpr | conditionals.rb:40:8:40:12 | ... > ... | conditionals.rb:40:14:41:5 | then ... | false |
|
||||
| conditionals.rb:45:1:49:3 | unless ... | UnlessExpr | conditionals.rb:45:8:45:13 | ... == ... | conditionals.rb:45:14:46:5 | then ... | false |
|
||||
| conditionals.rb:45:1:49:3 | unless ... | UnlessExpr | conditionals.rb:45:8:45:13 | ... == ... | conditionals.rb:47:1:48:5 | else ... | true |
|
||||
| conditionals.rb:52:1:52:14 | ... if ... | IfModifierExpr | conditionals.rb:52:10:52:14 | ... > ... | conditionals.rb:52:1:52:5 | ... = ... | true |
|
||||
| conditionals.rb:55:1:55:18 | ... unless ... | UnlessModifierExpr | conditionals.rb:55:14:55:18 | ... < ... | conditionals.rb:55:1:55:5 | ... = ... | false |
|
||||
| conditionals.rb:58:5:58:25 | ... ? ... : ... | TernaryIfExpr | conditionals.rb:58:5:58:9 | ... > ... | conditionals.rb:58:13:58:17 | ... + ... | true |
|
||||
| conditionals.rb:58:5:58:25 | ... ? ... : ... | TernaryIfExpr | conditionals.rb:58:5:58:9 | ... > ... | conditionals.rb:58:21:58:25 | ... - ... | false |
|
||||
| conditionals.rb:61:1:64:3 | if ... | IfExpr | conditionals.rb:61:4:61:8 | ... > ... | conditionals.rb:61:10:62:5 | c | true |
|
||||
| conditionals.rb:67:1:70:3 | if ... | IfExpr | conditionals.rb:67:4:67:8 | ... > ... | conditionals.rb:68:1:69:5 | c | false |
|
||||
| conditionals.rb:61:1:64:3 | if ... | IfExpr | conditionals.rb:61:4:61:8 | ... > ... | conditionals.rb:61:10:62:5 | then ... | true |
|
||||
| conditionals.rb:61:1:64:3 | if ... | IfExpr | conditionals.rb:61:4:61:8 | ... > ... | conditionals.rb:63:1:63:4 | else ... | false |
|
||||
| conditionals.rb:67:1:70:3 | if ... | IfExpr | conditionals.rb:67:4:67:8 | ... > ... | conditionals.rb:67:10:67:13 | then ... | true |
|
||||
| conditionals.rb:67:1:70:3 | if ... | IfExpr | conditionals.rb:67:4:67:8 | ... > ... | conditionals.rb:68:1:69:5 | else ... | false |
|
||||
ifExprs
|
||||
| conditionals.rb:10:1:12:3 | if ... | IfExpr | conditionals.rb:10:4:10:8 | ... > ... | conditionals.rb:10:10:11:5 | c | (none) | false |
|
||||
| conditionals.rb:15:1:19:3 | if ... | IfExpr | conditionals.rb:15:4:15:9 | ... == ... | conditionals.rb:15:10:16:5 | c | d | false |
|
||||
| conditionals.rb:22:1:30:3 | if ... | IfExpr | conditionals.rb:22:4:22:9 | ... == ... | conditionals.rb:22:11:23:5 | c | elsif ... | false |
|
||||
| conditionals.rb:24:1:29:5 | elsif ... | IfExpr | conditionals.rb:24:7:24:12 | ... == ... | conditionals.rb:24:14:25:5 | d | elsif ... | true |
|
||||
| conditionals.rb:26:1:29:5 | elsif ... | IfExpr | conditionals.rb:26:7:26:12 | ... == ... | conditionals.rb:26:14:27:5 | e | f | true |
|
||||
| conditionals.rb:33:1:37:3 | if ... | IfExpr | conditionals.rb:33:4:33:9 | ... == ... | conditionals.rb:33:10:34:5 | b | elsif ... | false |
|
||||
| conditionals.rb:35:1:36:5 | elsif ... | IfExpr | conditionals.rb:35:7:35:12 | ... == ... | conditionals.rb:35:13:36:5 | c | (none) | true |
|
||||
| conditionals.rb:61:1:64:3 | if ... | IfExpr | conditionals.rb:61:4:61:8 | ... > ... | conditionals.rb:61:10:62:5 | c | (none) | false |
|
||||
| conditionals.rb:10:1:12:3 | if ... | IfExpr | conditionals.rb:10:4:10:8 | ... > ... | conditionals.rb:10:10:11:5 | then ... | (none) | false |
|
||||
| conditionals.rb:15:1:19:3 | if ... | IfExpr | conditionals.rb:15:4:15:9 | ... == ... | conditionals.rb:15:10:16:5 | then ... | else ... | false |
|
||||
| conditionals.rb:22:1:30:3 | if ... | IfExpr | conditionals.rb:22:4:22:9 | ... == ... | conditionals.rb:22:11:23:5 | then ... | elsif ... | false |
|
||||
| conditionals.rb:24:1:29:5 | elsif ... | IfExpr | conditionals.rb:24:7:24:12 | ... == ... | conditionals.rb:24:14:25:5 | then ... | elsif ... | true |
|
||||
| conditionals.rb:26:1:29:5 | elsif ... | IfExpr | conditionals.rb:26:7:26:12 | ... == ... | conditionals.rb:26:14:27:5 | then ... | else ... | true |
|
||||
| conditionals.rb:33:1:37:3 | if ... | IfExpr | conditionals.rb:33:4:33:9 | ... == ... | conditionals.rb:33:10:34:5 | then ... | elsif ... | false |
|
||||
| conditionals.rb:35:1:36:5 | elsif ... | IfExpr | conditionals.rb:35:7:35:12 | ... == ... | conditionals.rb:35:13:36:5 | then ... | (none) | true |
|
||||
| conditionals.rb:61:1:64:3 | if ... | IfExpr | conditionals.rb:61:4:61:8 | ... > ... | conditionals.rb:61:10:62:5 | then ... | else ... | false |
|
||||
| conditionals.rb:67:1:70:3 | if ... | IfExpr | conditionals.rb:67:4:67:8 | ... > ... | conditionals.rb:67:10:67:13 | then ... | else ... | false |
|
||||
unlessExprs
|
||||
| conditionals.rb:40:1:42:3 | unless ... | UnlessExpr | conditionals.rb:40:8:40:12 | ... > ... | conditionals.rb:40:14:41:5 | c | (none) |
|
||||
| conditionals.rb:45:1:49:3 | unless ... | UnlessExpr | conditionals.rb:45:8:45:13 | ... == ... | conditionals.rb:45:14:46:5 | c | d |
|
||||
| conditionals.rb:40:1:42:3 | unless ... | UnlessExpr | conditionals.rb:40:8:40:12 | ... > ... | conditionals.rb:40:14:41:5 | then ... | (none) |
|
||||
| conditionals.rb:45:1:49:3 | unless ... | UnlessExpr | conditionals.rb:45:8:45:13 | ... == ... | conditionals.rb:45:14:46:5 | then ... | else ... |
|
||||
ifModifierExprs
|
||||
| conditionals.rb:52:1:52:14 | ... if ... | IfModifierExpr | conditionals.rb:52:10:52:14 | ... > ... | conditionals.rb:52:1:52:5 | ... = ... |
|
||||
unlessModifierExprs
|
||||
|
||||
@@ -1,48 +1,50 @@
|
||||
loops
|
||||
| loops.rb:9:1:12:3 | for ... in ... | ForExpr | loops.rb:9:15:12:3 | ...; ... | StmtSequence |
|
||||
| loops.rb:16:1:19:3 | for ... in ... | ForExpr | loops.rb:16:15:19:3 | ...; ... | StmtSequence |
|
||||
| loops.rb:22:1:25:3 | for ... in ... | ForExpr | loops.rb:22:35:25:3 | ...; ... | StmtSequence |
|
||||
| loops.rb:28:1:32:3 | for ... in ... | ForExpr | loops.rb:28:37:32:3 | ...; ... | StmtSequence |
|
||||
| loops.rb:35:1:39:3 | while ... | WhileExpr | loops.rb:35:12:39:3 | ...; ... | StmtSequence |
|
||||
| loops.rb:42:1:45:3 | while ... | WhileExpr | loops.rb:42:13:45:3 | ...; ... | StmtSequence |
|
||||
| loops.rb:9:1:12:3 | for ... in ... | ForExpr | loops.rb:9:15:12:3 | do ... | StmtSequence |
|
||||
| loops.rb:16:1:19:3 | for ... in ... | ForExpr | loops.rb:16:15:19:3 | do ... | StmtSequence |
|
||||
| loops.rb:22:1:25:3 | for ... in ... | ForExpr | loops.rb:22:35:25:3 | do ... | StmtSequence |
|
||||
| loops.rb:28:1:32:3 | for ... in ... | ForExpr | loops.rb:28:37:32:3 | do ... | StmtSequence |
|
||||
| loops.rb:35:1:39:3 | while ... | WhileExpr | loops.rb:35:12:39:3 | do ... | StmtSequence |
|
||||
| loops.rb:42:1:45:3 | while ... | WhileExpr | loops.rb:42:13:45:3 | do ... | StmtSequence |
|
||||
| loops.rb:48:1:48:19 | ... while ... | WhileModifierExpr | loops.rb:48:1:48:6 | ... += ... | AssignAddExpr |
|
||||
| loops.rb:51:1:54:3 | until ... | UntilExpr | loops.rb:51:13:54:3 | ...; ... | StmtSequence |
|
||||
| loops.rb:57:1:60:3 | until ... | UntilExpr | loops.rb:57:13:60:3 | ...; ... | StmtSequence |
|
||||
| loops.rb:51:1:54:3 | until ... | UntilExpr | loops.rb:51:13:54:3 | do ... | StmtSequence |
|
||||
| loops.rb:57:1:60:3 | until ... | UntilExpr | loops.rb:57:13:60:3 | do ... | StmtSequence |
|
||||
| loops.rb:63:1:63:19 | ... until ... | UntilModifierExpr | loops.rb:63:1:63:6 | ... -= ... | AssignSubExpr |
|
||||
| loops.rb:66:1:67:3 | while ... | WhileExpr | loops.rb:66:13:67:3 | do ... | StmtSequence |
|
||||
conditionalLoops
|
||||
| loops.rb:35:1:39:3 | while ... | WhileExpr | loops.rb:35:7:35:11 | ... < ... | loops.rb:35:12:39:3 | ...; ... | StmtSequence |
|
||||
| loops.rb:42:1:45:3 | while ... | WhileExpr | loops.rb:42:7:42:11 | ... < ... | loops.rb:42:13:45:3 | ...; ... | StmtSequence |
|
||||
| loops.rb:35:1:39:3 | while ... | WhileExpr | loops.rb:35:7:35:11 | ... < ... | loops.rb:35:12:39:3 | do ... | StmtSequence |
|
||||
| loops.rb:42:1:45:3 | while ... | WhileExpr | loops.rb:42:7:42:11 | ... < ... | loops.rb:42:13:45:3 | do ... | StmtSequence |
|
||||
| loops.rb:48:1:48:19 | ... while ... | WhileModifierExpr | loops.rb:48:14:48:19 | ... >= ... | loops.rb:48:1:48:6 | ... += ... | AssignAddExpr |
|
||||
| loops.rb:51:1:54:3 | until ... | UntilExpr | loops.rb:51:7:51:12 | ... == ... | loops.rb:51:13:54:3 | ...; ... | StmtSequence |
|
||||
| loops.rb:57:1:60:3 | until ... | UntilExpr | loops.rb:57:7:57:11 | ... > ... | loops.rb:57:13:60:3 | ...; ... | StmtSequence |
|
||||
| loops.rb:51:1:54:3 | until ... | UntilExpr | loops.rb:51:7:51:12 | ... == ... | loops.rb:51:13:54:3 | do ... | StmtSequence |
|
||||
| loops.rb:57:1:60:3 | until ... | UntilExpr | loops.rb:57:7:57:11 | ... > ... | loops.rb:57:13:60:3 | do ... | StmtSequence |
|
||||
| loops.rb:63:1:63:19 | ... until ... | UntilModifierExpr | loops.rb:63:14:63:19 | ... == ... | loops.rb:63:1:63:6 | ... -= ... | AssignSubExpr |
|
||||
| loops.rb:66:1:67:3 | while ... | WhileExpr | loops.rb:66:7:66:11 | ... < ... | loops.rb:66:13:67:3 | do ... | StmtSequence |
|
||||
forExprs
|
||||
| loops.rb:9:1:12:3 | for ... in ... | loops.rb:9:5:9:5 | n | loops.rb:9:15:12:3 | ...; ... | 0 | loops.rb:10:5:10:12 | ... += ... |
|
||||
| loops.rb:9:1:12:3 | for ... in ... | loops.rb:9:5:9:5 | n | loops.rb:9:15:12:3 | ...; ... | 1 | loops.rb:11:5:11:11 | ... = ... |
|
||||
| loops.rb:16:1:19:3 | for ... in ... | loops.rb:16:5:16:5 | n | loops.rb:16:15:19:3 | ...; ... | 0 | loops.rb:17:5:17:12 | ... += ... |
|
||||
| loops.rb:16:1:19:3 | for ... in ... | loops.rb:16:5:16:5 | n | loops.rb:16:15:19:3 | ...; ... | 1 | loops.rb:18:5:18:12 | ... -= ... |
|
||||
| loops.rb:22:1:25:3 | for ... in ... | loops.rb:22:5:22:14 | (..., ...) | loops.rb:22:35:25:3 | ...; ... | 0 | loops.rb:23:3:23:14 | ... += ... |
|
||||
| loops.rb:22:1:25:3 | for ... in ... | loops.rb:22:5:22:14 | (..., ...) | loops.rb:22:35:25:3 | ...; ... | 1 | loops.rb:24:3:24:14 | ... *= ... |
|
||||
| loops.rb:28:1:32:3 | for ... in ... | loops.rb:28:5:28:16 | (..., ...) | loops.rb:28:37:32:3 | ...; ... | 0 | loops.rb:29:3:29:14 | ... += ... |
|
||||
| loops.rb:28:1:32:3 | for ... in ... | loops.rb:28:5:28:16 | (..., ...) | loops.rb:28:37:32:3 | ...; ... | 1 | loops.rb:30:3:30:14 | ... /= ... |
|
||||
| loops.rb:28:1:32:3 | for ... in ... | loops.rb:28:5:28:16 | (..., ...) | loops.rb:28:37:32:3 | ...; ... | 2 | loops.rb:31:3:31:7 | break |
|
||||
| loops.rb:9:1:12:3 | for ... in ... | loops.rb:9:5:9:5 | n | loops.rb:9:15:12:3 | do ... | 0 | loops.rb:10:5:10:12 | ... += ... |
|
||||
| loops.rb:9:1:12:3 | for ... in ... | loops.rb:9:5:9:5 | n | loops.rb:9:15:12:3 | do ... | 1 | loops.rb:11:5:11:11 | ... = ... |
|
||||
| loops.rb:16:1:19:3 | for ... in ... | loops.rb:16:5:16:5 | n | loops.rb:16:15:19:3 | do ... | 0 | loops.rb:17:5:17:12 | ... += ... |
|
||||
| loops.rb:16:1:19:3 | for ... in ... | loops.rb:16:5:16:5 | n | loops.rb:16:15:19:3 | do ... | 1 | loops.rb:18:5:18:12 | ... -= ... |
|
||||
| loops.rb:22:1:25:3 | for ... in ... | loops.rb:22:5:22:14 | (..., ...) | loops.rb:22:35:25:3 | do ... | 0 | loops.rb:23:3:23:14 | ... += ... |
|
||||
| loops.rb:22:1:25:3 | for ... in ... | loops.rb:22:5:22:14 | (..., ...) | loops.rb:22:35:25:3 | do ... | 1 | loops.rb:24:3:24:14 | ... *= ... |
|
||||
| loops.rb:28:1:32:3 | for ... in ... | loops.rb:28:5:28:16 | (..., ...) | loops.rb:28:37:32:3 | do ... | 0 | loops.rb:29:3:29:14 | ... += ... |
|
||||
| loops.rb:28:1:32:3 | for ... in ... | loops.rb:28:5:28:16 | (..., ...) | loops.rb:28:37:32:3 | do ... | 1 | loops.rb:30:3:30:14 | ... /= ... |
|
||||
| loops.rb:28:1:32:3 | for ... in ... | loops.rb:28:5:28:16 | (..., ...) | loops.rb:28:37:32:3 | do ... | 2 | loops.rb:31:3:31:7 | break |
|
||||
forExprsTuplePatterns
|
||||
| loops.rb:22:1:25:3 | for ... in ... | loops.rb:22:5:22:14 | (..., ...) | 0 | loops.rb:22:5:22:7 | key |
|
||||
| loops.rb:22:1:25:3 | for ... in ... | loops.rb:22:5:22:14 | (..., ...) | 1 | loops.rb:22:10:22:14 | value |
|
||||
| loops.rb:28:1:32:3 | for ... in ... | loops.rb:28:5:28:16 | (..., ...) | 0 | loops.rb:28:6:28:8 | key |
|
||||
| loops.rb:28:1:32:3 | for ... in ... | loops.rb:28:5:28:16 | (..., ...) | 1 | loops.rb:28:11:28:15 | value |
|
||||
whileExprs
|
||||
| loops.rb:35:1:39:3 | while ... | loops.rb:35:7:35:11 | ... < ... | loops.rb:35:12:39:3 | ...; ... | 0 | loops.rb:36:3:36:8 | ... += ... |
|
||||
| loops.rb:35:1:39:3 | while ... | loops.rb:35:7:35:11 | ... < ... | loops.rb:35:12:39:3 | ...; ... | 1 | loops.rb:37:3:37:8 | ... += ... |
|
||||
| loops.rb:35:1:39:3 | while ... | loops.rb:35:7:35:11 | ... < ... | loops.rb:35:12:39:3 | ...; ... | 2 | loops.rb:38:3:38:6 | next |
|
||||
| loops.rb:42:1:45:3 | while ... | loops.rb:42:7:42:11 | ... < ... | loops.rb:42:13:45:3 | ...; ... | 0 | loops.rb:43:3:43:8 | ... += ... |
|
||||
| loops.rb:42:1:45:3 | while ... | loops.rb:42:7:42:11 | ... < ... | loops.rb:42:13:45:3 | ...; ... | 1 | loops.rb:44:3:44:8 | ... += ... |
|
||||
| loops.rb:35:1:39:3 | while ... | loops.rb:35:7:35:11 | ... < ... | loops.rb:35:12:39:3 | do ... | 0 | loops.rb:36:3:36:8 | ... += ... |
|
||||
| loops.rb:35:1:39:3 | while ... | loops.rb:35:7:35:11 | ... < ... | loops.rb:35:12:39:3 | do ... | 1 | loops.rb:37:3:37:8 | ... += ... |
|
||||
| loops.rb:35:1:39:3 | while ... | loops.rb:35:7:35:11 | ... < ... | loops.rb:35:12:39:3 | do ... | 2 | loops.rb:38:3:38:6 | next |
|
||||
| loops.rb:42:1:45:3 | while ... | loops.rb:42:7:42:11 | ... < ... | loops.rb:42:13:45:3 | do ... | 0 | loops.rb:43:3:43:8 | ... += ... |
|
||||
| loops.rb:42:1:45:3 | while ... | loops.rb:42:7:42:11 | ... < ... | loops.rb:42:13:45:3 | do ... | 1 | loops.rb:44:3:44:8 | ... += ... |
|
||||
whileModifierExprs
|
||||
| loops.rb:48:1:48:19 | ... while ... | loops.rb:48:14:48:19 | ... >= ... | loops.rb:48:1:48:6 | ... += ... |
|
||||
untilExprs
|
||||
| loops.rb:51:1:54:3 | until ... | loops.rb:51:7:51:12 | ... == ... | loops.rb:51:13:54:3 | ...; ... | 0 | loops.rb:52:3:52:8 | ... += ... |
|
||||
| loops.rb:51:1:54:3 | until ... | loops.rb:51:7:51:12 | ... == ... | loops.rb:51:13:54:3 | ...; ... | 1 | loops.rb:53:3:53:8 | ... -= ... |
|
||||
| loops.rb:57:1:60:3 | until ... | loops.rb:57:7:57:11 | ... > ... | loops.rb:57:13:60:3 | ...; ... | 0 | loops.rb:58:3:58:8 | ... += ... |
|
||||
| loops.rb:57:1:60:3 | until ... | loops.rb:57:7:57:11 | ... > ... | loops.rb:57:13:60:3 | ...; ... | 1 | loops.rb:59:3:59:8 | ... -= ... |
|
||||
| loops.rb:51:1:54:3 | until ... | loops.rb:51:7:51:12 | ... == ... | loops.rb:51:13:54:3 | do ... | 0 | loops.rb:52:3:52:8 | ... += ... |
|
||||
| loops.rb:51:1:54:3 | until ... | loops.rb:51:7:51:12 | ... == ... | loops.rb:51:13:54:3 | do ... | 1 | loops.rb:53:3:53:8 | ... -= ... |
|
||||
| loops.rb:57:1:60:3 | until ... | loops.rb:57:7:57:11 | ... > ... | loops.rb:57:13:60:3 | do ... | 0 | loops.rb:58:3:58:8 | ... += ... |
|
||||
| loops.rb:57:1:60:3 | until ... | loops.rb:57:7:57:11 | ... > ... | loops.rb:57:13:60:3 | do ... | 1 | loops.rb:59:3:59:8 | ... -= ... |
|
||||
untilModifierExprs
|
||||
| loops.rb:63:1:63:19 | ... until ... | loops.rb:63:14:63:19 | ... == ... | loops.rb:63:1:63:6 | ... -= ... |
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,20 +3,20 @@
|
||||
| local_dataflow.rb:2:7:2:7 | a | local_dataflow.rb:2:3:2:7 | ... = ... |
|
||||
| local_dataflow.rb:2:7:2:7 | a | local_dataflow.rb:2:3:2:7 | ... = ... |
|
||||
| local_dataflow.rb:2:7:2:7 | a | local_dataflow.rb:3:10:3:10 | a |
|
||||
| local_dataflow.rb:3:7:3:14 | (...; ...) | local_dataflow.rb:3:3:3:14 | ... = ... |
|
||||
| local_dataflow.rb:3:7:3:14 | ( ... ) | local_dataflow.rb:3:3:3:14 | ... = ... |
|
||||
| local_dataflow.rb:3:10:3:10 | [post] a | local_dataflow.rb:4:11:4:11 | a |
|
||||
| local_dataflow.rb:3:10:3:10 | a | local_dataflow.rb:4:11:4:11 | a |
|
||||
| local_dataflow.rb:3:13:3:13 | b | local_dataflow.rb:3:7:3:14 | (...; ...) |
|
||||
| local_dataflow.rb:3:13:3:13 | b | local_dataflow.rb:3:7:3:14 | ( ... ) |
|
||||
| local_dataflow.rb:3:13:3:13 | b | local_dataflow.rb:6:13:6:13 | b |
|
||||
| local_dataflow.rb:4:7:4:11 | ... = ... | local_dataflow.rb:4:3:4:11 | ... = ... |
|
||||
| local_dataflow.rb:4:11:4:11 | a | local_dataflow.rb:4:7:4:11 | ... = ... |
|
||||
| local_dataflow.rb:4:11:4:11 | a | local_dataflow.rb:5:12:5:12 | a |
|
||||
| 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: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: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:7:6:14 | (... += ...) |
|
||||
| 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:7:6:14 | ( ... ) |
|
||||
| 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 | ... = ... |
|
||||
@@ -24,12 +24,15 @@
|
||||
| local_dataflow.rb:10:9:10:9 | x | local_dataflow.rb:12:5:12:5 | x |
|
||||
| local_dataflow.rb:10:14:10:18 | array | local_dataflow.rb:10:5:13:3 | for ... in ... |
|
||||
| local_dataflow.rb:10:14:10:18 | array | local_dataflow.rb:15:10:15:14 | array |
|
||||
| local_dataflow.rb:12:3:12:5 | call to p | local_dataflow.rb:10:19:13:3 | do ... |
|
||||
| local_dataflow.rb:15:10:15:14 | array | local_dataflow.rb:15:1:17:3 | for ... in ... |
|
||||
| local_dataflow.rb:15:10:15:14 | array | local_dataflow.rb:19:10:19:14 | array |
|
||||
| local_dataflow.rb:16:3:16:10 | break | local_dataflow.rb:15:1:17:3 | for ... in ... |
|
||||
| local_dataflow.rb:16:9:16:10 | 10 | local_dataflow.rb:16:3:16:10 | break |
|
||||
| local_dataflow.rb:19:5:19:5 | x | local_dataflow.rb:20:6:20:6 | x |
|
||||
| local_dataflow.rb:19:10:19:14 | array | local_dataflow.rb:19:1:21:3 | for ... in ... |
|
||||
| local_dataflow.rb:20:3:20:25 | if ... | local_dataflow.rb:19:16:21:3 | do ... |
|
||||
| local_dataflow.rb:20:12:20:21 | then ... | local_dataflow.rb:20:3:20:25 | if ... |
|
||||
| local_dataflow.rb:20:17:20:21 | break | local_dataflow.rb:19:1:21:3 | for ... in ... |
|
||||
| local_dataflow.rb:24:2:24:8 | break | local_dataflow.rb:23:1:25:3 | while ... |
|
||||
| local_dataflow.rb:24:8:24:8 | 5 | local_dataflow.rb:24:2:24:8 | break |
|
||||
@@ -40,8 +43,10 @@
|
||||
| local_dataflow.rb:32:5:32:25 | bar | local_dataflow.rb:32:1:32:25 | ... = ... |
|
||||
| local_dataflow.rb:32:5:32:25 | bar | local_dataflow.rb:32:1:32:25 | ... = ... |
|
||||
| local_dataflow.rb:34:7:34:7 | x | local_dataflow.rb:35:6:35:6 | x |
|
||||
| local_dataflow.rb:35:12:36:13 | then ... | local_dataflow.rb:35:3:37:5 | if ... |
|
||||
| local_dataflow.rb:36:13:36:13 | 7 | local_dataflow.rb:36:6:36:13 | return |
|
||||
| local_dataflow.rb:41:7:41:7 | x | local_dataflow.rb:42:6:42:6 | x |
|
||||
| local_dataflow.rb:42:12:43:13 | then ... | local_dataflow.rb:42:3:44:5 | if ... |
|
||||
| local_dataflow.rb:43:13:43:13 | 7 | local_dataflow.rb:43:6:43:13 | return |
|
||||
| local_dataflow.rb:45:10:45:10 | 6 | local_dataflow.rb:45:3:45:10 | return |
|
||||
| local_dataflow.rb:49:3:53:3 | <captured> | local_dataflow.rb:50:18:50:18 | x |
|
||||
|
||||
Reference in New Issue
Block a user