Include simple interpolations in getValueText

When calculating `StringlikeLiteral.getValueText`, include results from
interpolations where we can determine their string value. For example:

    b = "b" # local variable
    D = "d" # constant

    "a#{b}c"     # getValueText() = "abc"
    "a#{b}c{D}"  # getValueText() = "abcd"
    /#a#{b}c{D}/ # getValueText() = "abcd"
This commit is contained in:
Harry Maclean
2021-12-07 17:55:46 +13:00
committed by Harry Maclean
parent 3df3fb092b
commit 32c93e70e2
10 changed files with 411 additions and 131 deletions

View File

@@ -3,6 +3,7 @@ private import codeql.ruby.security.performance.RegExpTreeView as RETV
private import internal.AST
private import internal.Scope
private import internal.TreeSitter
private import codeql.ruby.controlflow.CfgNodes
/**
* A literal.
@@ -411,14 +412,14 @@ class StringlikeLiteral extends Literal, TStringlikeLiteral {
}
override string getValueText() {
// 0 components should result in the empty string
// if there are any interpolations, there should be no result
// otherwise, concatenate all the components
forall(StringComponent c | c = this.getComponent(_) |
not c instanceof StringInterpolationComponent
) and
result =
concat(StringComponent c, int i | c = this.getComponent(i) | c.getValueText() order by i)
or
exists(this.getComponent(_)) and
result = this.getAControlFlowNode().(ExprNodes::StringlikeLiteralCfgNode).getValueText()
}
override string toString() {

View File

@@ -128,6 +128,8 @@ class ReturningCfgNode extends AstCfgNode {
/** A control-flow node that wraps a `StringComponent` AST expression. */
class StringComponentCfgNode extends AstCfgNode {
StringComponentCfgNode() { this.getNode() instanceof StringComponent }
string getValueText() { result = this.getNode().(StringComponent).getValueText() }
}
private Expr desugar(Expr n) {
@@ -463,8 +465,13 @@ module ExprNodes {
}
/** A control-flow node that wraps a `StringInterpolationComponent` AST expression. */
class StringInterpolationComponentCfgNode extends StmtSequenceCfgNode {
class StringInterpolationComponentCfgNode extends StringComponentCfgNode, StmtSequenceCfgNode {
StringInterpolationComponentCfgNode() { this.getNode() instanceof StringInterpolationComponent }
// If last statement in the interpolation is a constant or local variable read,
// we attempt to look up its string value.
// If there's a result, we return that as the string value of the interpolation.
final override string getValueText() { result = this.getLastStmt().getValueText() }
}
private class StringlikeLiteralChildMapping extends ExprChildMapping, StringlikeLiteral {
@@ -477,8 +484,36 @@ module ExprNodes {
final override StringlikeLiteral getExpr() { result = super.getExpr() }
/** Gets the `n`th component of this `StringlikeLiteral` */
StringComponentCfgNode getComponent(int n) { result.getNode() = e.getComponent(n) }
/** Gets a component of this `StringlikeLiteral` */
StringComponentCfgNode getAComponent() { e.hasCfgChild(e.getComponent(_), this, result) }
StringComponentCfgNode getAComponent() { result = this.getComponent(_) }
// 0 components results in the empty string
// if all interpolations have a known string value, we will get a result
language[monotonicAggregates]
override string getValueText() {
result = e.getValueText()
or
result =
concat(StringComponent c, int i |
c = e.getComponent(i)
|
getComponentValueText(c) order by i
)
}
/**
* Get the `ValueText()` of a `StringComponent`.
* If the component has a CFG node, defer to that (in order to resolve variables in interpolations).
* Otherwise, defer to the AST node.
*/
private string getComponentValueText(StringComponent c) {
exists(StringComponentCfgNode n | n.getNode() = c | result = n.getValueText())
or
not exists(StringComponentCfgNode n | n.getNode() = c) and result = c.getValueText()
}
}
/** A control-flow node that wraps a `StringLiteral` AST expression. */

View File

@@ -1515,6 +1515,22 @@ literals/literals.rb:
# 66| getStmt: [AddExpr] ... + ...
# 66| getAnOperand/getLeftOperand/getReceiver: [IntegerLiteral] 1
# 66| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 9
# 67| getStmt: [AssignExpr] ... = ...
# 67| getAnOperand/getLeftOperand: [LocalVariableAccess] bar
# 67| getAnOperand/getRightOperand: [StringLiteral] "bar"
# 67| getComponent: [StringTextComponent] bar
# 68| getStmt: [AssignExpr] ... = ...
# 68| getAnOperand/getLeftOperand: [ConstantAssignment] BAR
# 68| getAnOperand/getRightOperand: [StringLiteral] "bar"
# 68| getComponent: [StringTextComponent] bar
# 69| getStmt: [StringLiteral] "foo #{...}"
# 69| getComponent: [StringTextComponent] foo
# 69| getComponent: [StringInterpolationComponent] #{...}
# 69| getStmt: [LocalVariableAccess] bar
# 70| getStmt: [StringLiteral] "foo #{...}"
# 70| getComponent: [StringTextComponent] foo
# 70| getComponent: [StringInterpolationComponent] #{...}
# 70| getStmt: [ConstantReadAccess] BAR
# 73| getStmt: [CharacterLiteral] ?x
# 74| getStmt: [CharacterLiteral] ?\n
# 75| getStmt: [CharacterLiteral] ?\s
@@ -1539,14 +1555,20 @@ literals/literals.rb:
# 89| getComponent: [StringTextComponent] wibble
# 90| getStmt: [SymbolLiteral] :"wibble wobble"
# 90| getComponent: [StringTextComponent] wibble wobble
# 91| getStmt: [SymbolLiteral] :"foo_#{...}"
# 91| getStmt: [SymbolLiteral] :"foo_#{...}_#{...}_#{...}"
# 91| getComponent: [StringTextComponent] foo_
# 91| getComponent: [StringInterpolationComponent] #{...}
# 91| getStmt: [AddExpr] ... + ...
# 91| getAnOperand/getLeftOperand/getReceiver: [IntegerLiteral] 2
# 91| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 2
# 92| getStmt: [SymbolLiteral] :"foo_#{ 1 + 1 }"
# 92| getComponent: [StringTextComponent] foo_#{ 1 + 1 }
# 91| getComponent: [StringTextComponent] _
# 91| getComponent: [StringInterpolationComponent] #{...}
# 91| getStmt: [LocalVariableAccess] bar
# 91| getComponent: [StringTextComponent] _
# 91| getComponent: [StringInterpolationComponent] #{...}
# 91| getStmt: [ConstantReadAccess] BAR
# 92| getStmt: [SymbolLiteral] :"foo_#{ 2 + 2}_#{bar}_#{BAR}"
# 92| getComponent: [StringTextComponent] foo_#{ 2 + 2}_#{bar}_#{BAR}
# 93| getStmt: [SymbolLiteral] :"foo_#{ 3 - 2 }"
# 93| getComponent: [StringTextComponent] foo_#{ 3 - 2 }
# 96| getStmt: [ArrayLiteral] [...]
@@ -1589,6 +1611,12 @@ literals/literals.rb:
# 105| getStmt: [AddExpr] ... + ...
# 105| getAnOperand/getLeftOperand/getReceiver: [IntegerLiteral] 1
# 105| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 1
# 105| getElement: [StringLiteral] "#{...}"
# 105| getComponent: [StringInterpolationComponent] #{...}
# 105| getStmt: [LocalVariableAccess] bar
# 105| getElement: [StringLiteral] "#{...}"
# 105| getComponent: [StringInterpolationComponent] #{...}
# 105| getStmt: [ConstantReadAccess] BAR
# 105| getElement: [StringLiteral] "baz"
# 105| getComponent: [StringTextComponent] baz
# 106| getStmt: [ArrayLiteral] %w(...)
@@ -1596,6 +1624,10 @@ literals/literals.rb:
# 106| getComponent: [StringTextComponent] foo
# 106| getElement: [StringLiteral] "bar#{1+1}"
# 106| getComponent: [StringTextComponent] bar#{1+1}
# 106| getElement: [StringLiteral] "#{bar}"
# 106| getComponent: [StringTextComponent] #{bar}
# 106| getElement: [StringLiteral] "#{BAR}"
# 106| getComponent: [StringTextComponent] #{BAR}
# 106| getElement: [StringLiteral] "baz"
# 106| getComponent: [StringTextComponent] baz
# 109| getStmt: [ArrayLiteral] %i(...)
@@ -1622,6 +1654,12 @@ literals/literals.rb:
# 112| getStmt: [AddExpr] ... + ...
# 112| getAnOperand/getLeftOperand/getReceiver: [IntegerLiteral] 2
# 112| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 4
# 112| getElement: [SymbolLiteral] :"#{...}"
# 112| getComponent: [StringInterpolationComponent] #{...}
# 112| getStmt: [LocalVariableAccess] bar
# 112| getElement: [SymbolLiteral] :"#{...}"
# 112| getComponent: [StringInterpolationComponent] #{...}
# 112| getStmt: [ConstantReadAccess] BAR
# 112| getElement: [SymbolLiteral] :"baz"
# 112| getComponent: [StringTextComponent] baz
# 113| getStmt: [ArrayLiteral] %i(...)
@@ -1637,6 +1675,10 @@ literals/literals.rb:
# 113| getComponent: [StringTextComponent] 4
# 113| getElement: [SymbolLiteral] :"}"
# 113| getComponent: [StringTextComponent] }
# 113| getElement: [SymbolLiteral] :"#{bar}"
# 113| getComponent: [StringTextComponent] #{bar}
# 113| getElement: [SymbolLiteral] :"#{BAR}"
# 113| getComponent: [StringTextComponent] #{BAR}
# 113| getElement: [SymbolLiteral] :"baz"
# 113| getComponent: [StringTextComponent] baz
# 116| getStmt: [HashLiteral] {...}
@@ -1656,7 +1698,7 @@ literals/literals.rb:
# 118| getKey: [SymbolLiteral] :foo
# 118| getValue: [IntegerLiteral] 7
# 118| getElement: [HashSplatExpr] ** ...
# 118| getAnOperand/getOperand/getReceiver: [MethodCall] call to bar
# 118| getAnOperand/getOperand/getReceiver: [MethodCall] call to baz
# 118| getReceiver: [Self, SelfVariableAccess] self
# 121| getStmt: [ParenthesizedExpr] ( ... )
# 121| getStmt: [RangeLiteral] _ .. _
@@ -1692,12 +1734,18 @@ literals/literals.rb:
# 130| getComponent: [StringTextComponent] ls -l
# 131| getStmt: [SubshellLiteral] `ls -l`
# 131| getComponent: [StringTextComponent] ls -l
# 132| getStmt: [SubshellLiteral] `du -d #{...}`
# 132| getStmt: [SubshellLiteral] `du -d #{...} #{...} #{...}`
# 132| getComponent: [StringTextComponent] du -d
# 132| getComponent: [StringInterpolationComponent] #{...}
# 132| getStmt: [AddExpr] ... + ...
# 132| getAnOperand/getLeftOperand/getReceiver: [IntegerLiteral] 1
# 132| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 1
# 132| getComponent: [StringTextComponent]
# 132| getComponent: [StringInterpolationComponent] #{...}
# 132| getStmt: [LocalVariableAccess] bar
# 132| getComponent: [StringTextComponent]
# 132| getComponent: [StringInterpolationComponent] #{...}
# 132| getStmt: [ConstantReadAccess] BAR
# 133| getStmt: [SubshellLiteral] `du -d #{...}`
# 133| getComponent: [StringTextComponent] du -d
# 133| getComponent: [StringInterpolationComponent] #{...}
@@ -1732,13 +1780,31 @@ literals/literals.rb:
# 139| getComponent: [StringEscapeSequenceComponent] \s
# 139| getComponent: [StringTextComponent] bar
# 139| getComponent: [StringEscapeSequenceComponent] \S
# 140| getStmt: [RegExpLiteral] /foo#{...}bar/
# 140| getStmt: [RegExpLiteral] /foo#{...}bar#{...}#{...}/
# 140| getParsed: [RegExpSequence] foo2barbarbar
# 140| 0: [RegExpConstant, RegExpNormalChar] f
# 140| 1: [RegExpConstant, RegExpNormalChar] o
# 140| 2: [RegExpConstant, RegExpNormalChar] o
# 140| 3: [RegExpConstant, RegExpNormalChar] 2
# 140| 4: [RegExpConstant, RegExpNormalChar] b
# 140| 5: [RegExpConstant, RegExpNormalChar] a
# 140| 6: [RegExpConstant, RegExpNormalChar] r
# 140| 7: [RegExpConstant, RegExpNormalChar] b
# 140| 8: [RegExpConstant, RegExpNormalChar] a
# 140| 9: [RegExpConstant, RegExpNormalChar] r
# 140| 10: [RegExpConstant, RegExpNormalChar] b
# 140| 11: [RegExpConstant, RegExpNormalChar] a
# 140| 12: [RegExpConstant, RegExpNormalChar] r
# 140| getComponent: [StringTextComponent] foo
# 140| getComponent: [StringInterpolationComponent] #{...}
# 140| getStmt: [AddExpr] ... + ...
# 140| getAnOperand/getLeftOperand/getReceiver: [IntegerLiteral] 1
# 140| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 1
# 140| getComponent: [StringTextComponent] bar
# 140| getComponent: [StringInterpolationComponent] #{...}
# 140| getStmt: [LocalVariableAccess] bar
# 140| getComponent: [StringInterpolationComponent] #{...}
# 140| getStmt: [ConstantReadAccess] BAR
# 141| getStmt: [RegExpLiteral] /foo/
# 141| getParsed: [RegExpSequence] foo
# 141| 0: [RegExpConstant, RegExpNormalChar] f
@@ -1773,13 +1839,31 @@ literals/literals.rb:
# 145| getComponent: [StringEscapeSequenceComponent] \s
# 145| getComponent: [StringTextComponent] bar
# 145| getComponent: [StringEscapeSequenceComponent] \S
# 146| getStmt: [RegExpLiteral] /foo#{...}bar/
# 146| getStmt: [RegExpLiteral] /foo#{...}bar#{...}#{...}/
# 146| getParsed: [RegExpSequence] foo2barbarbar
# 146| 0: [RegExpConstant, RegExpNormalChar] f
# 146| 1: [RegExpConstant, RegExpNormalChar] o
# 146| 2: [RegExpConstant, RegExpNormalChar] o
# 146| 3: [RegExpConstant, RegExpNormalChar] 2
# 146| 4: [RegExpConstant, RegExpNormalChar] b
# 146| 5: [RegExpConstant, RegExpNormalChar] a
# 146| 6: [RegExpConstant, RegExpNormalChar] r
# 146| 7: [RegExpConstant, RegExpNormalChar] b
# 146| 8: [RegExpConstant, RegExpNormalChar] a
# 146| 9: [RegExpConstant, RegExpNormalChar] r
# 146| 10: [RegExpConstant, RegExpNormalChar] b
# 146| 11: [RegExpConstant, RegExpNormalChar] a
# 146| 12: [RegExpConstant, RegExpNormalChar] r
# 146| getComponent: [StringTextComponent] foo
# 146| getComponent: [StringInterpolationComponent] #{...}
# 146| getStmt: [AddExpr] ... + ...
# 146| getAnOperand/getLeftOperand/getReceiver: [IntegerLiteral] 1
# 146| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 1
# 146| getComponent: [StringTextComponent] bar
# 146| getComponent: [StringInterpolationComponent] #{...}
# 146| getStmt: [LocalVariableAccess] bar
# 146| getComponent: [StringInterpolationComponent] #{...}
# 146| getStmt: [ConstantReadAccess] BAR
# 147| getStmt: [RegExpLiteral] /foo/
# 147| getParsed: [RegExpSequence] foo
# 147| 0: [RegExpConstant, RegExpNormalChar] f

View File

@@ -350,6 +350,12 @@ literals/literals.rb:
# 105| getStmt: [AddExpr] ... + ...
# 105| getAnOperand/getLeftOperand/getReceiver: [IntegerLiteral] 1
# 105| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 1
# 105| getArgument: [StringLiteral] "#{...}"
# 105| getComponent: [StringInterpolationComponent] #{...}
# 105| getStmt: [LocalVariableAccess] bar
# 105| getArgument: [StringLiteral] "#{...}"
# 105| getComponent: [StringInterpolationComponent] #{...}
# 105| getStmt: [ConstantReadAccess] BAR
# 105| getArgument: [StringLiteral] "baz"
# 105| getComponent: [StringTextComponent] baz
# 106| [ArrayLiteral] %w(...)
@@ -359,6 +365,10 @@ literals/literals.rb:
# 106| getComponent: [StringTextComponent] foo
# 106| getArgument: [StringLiteral] "bar#{1+1}"
# 106| getComponent: [StringTextComponent] bar#{1+1}
# 106| getArgument: [StringLiteral] "#{bar}"
# 106| getComponent: [StringTextComponent] #{bar}
# 106| getArgument: [StringLiteral] "#{BAR}"
# 106| getComponent: [StringTextComponent] #{BAR}
# 106| getArgument: [StringLiteral] "baz"
# 106| getComponent: [StringTextComponent] baz
# 109| [ArrayLiteral] %i(...)
@@ -393,6 +403,12 @@ literals/literals.rb:
# 112| getStmt: [AddExpr] ... + ...
# 112| getAnOperand/getLeftOperand/getReceiver: [IntegerLiteral] 2
# 112| getAnOperand/getArgument/getRightOperand: [IntegerLiteral] 4
# 112| getArgument: [SymbolLiteral] :"#{...}"
# 112| getComponent: [StringInterpolationComponent] #{...}
# 112| getStmt: [LocalVariableAccess] bar
# 112| getArgument: [SymbolLiteral] :"#{...}"
# 112| getComponent: [StringInterpolationComponent] #{...}
# 112| getStmt: [ConstantReadAccess] BAR
# 112| getArgument: [SymbolLiteral] :"baz"
# 112| getComponent: [StringTextComponent] baz
# 113| [ArrayLiteral] %i(...)
@@ -410,6 +426,10 @@ literals/literals.rb:
# 113| getComponent: [StringTextComponent] 4
# 113| getArgument: [SymbolLiteral] :"}"
# 113| getComponent: [StringTextComponent] }
# 113| getArgument: [SymbolLiteral] :"#{bar}"
# 113| getComponent: [StringTextComponent] #{bar}
# 113| getArgument: [SymbolLiteral] :"#{BAR}"
# 113| getComponent: [StringTextComponent] #{BAR}
# 113| getArgument: [SymbolLiteral] :"baz"
# 113| getComponent: [StringTextComponent] baz
control/loops.rb:

View File

@@ -389,9 +389,11 @@
| literals/literals.rb:55:1:55:20 | "FOO ' BAR " BAZ'" | FOO ' BAR " BAZ' |
| literals/literals.rb:56:1:56:12 | "foo\\ bar" | foo\\ bar |
| literals/literals.rb:57:1:57:12 | "foo\\ bar" | foo\\ bar |
| literals/literals.rb:58:1:58:20 | "2 + 2 = #{...}" | 2 + 2 = 4 |
| literals/literals.rb:58:13:58:13 | 2 | 2 |
| literals/literals.rb:58:13:58:17 | ... + ... | 4 |
| literals/literals.rb:58:17:58:17 | 2 | 2 |
| literals/literals.rb:59:1:59:22 | "3 + 4 = #{...}" | 3 + 4 = 7 |
| literals/literals.rb:59:15:59:15 | 3 | 3 |
| literals/literals.rb:59:15:59:19 | ... + ... | 7 |
| literals/literals.rb:59:19:59:19 | 4 | 4 |
@@ -404,16 +406,26 @@
| literals/literals.rb:63:9:63:13 | "bar" | bar |
| literals/literals.rb:63:15:63:19 | "baz" | baz |
| literals/literals.rb:64:1:64:5 | "foo" | foo |
| literals/literals.rb:64:7:64:21 | "bar#{...}" | bar1 |
| literals/literals.rb:64:14:64:14 | 1 | 1 |
| literals/literals.rb:64:14:64:18 | ... * ... | 1 |
| literals/literals.rb:64:18:64:18 | 1 | 1 |
| literals/literals.rb:64:23:64:27 | "baz" | baz |
| literals/literals.rb:65:1:65:35 | "foo #{...} qux" | foo bar 5 baz qux |
| literals/literals.rb:65:9:65:28 | "bar #{...} baz" | bar 5 baz |
| literals/literals.rb:65:17:65:17 | 2 | 2 |
| literals/literals.rb:65:17:65:21 | ... + ... | 5 |
| literals/literals.rb:65:21:65:21 | 3 | 3 |
| literals/literals.rb:66:1:66:22 | "foo #{...}" | foo 10 |
| literals/literals.rb:66:17:66:17 | 1 | 1 |
| literals/literals.rb:66:17:66:19 | ... + ... | 10 |
| literals/literals.rb:66:19:66:19 | 9 | 9 |
| literals/literals.rb:67:7:67:11 | "bar" | bar |
| literals/literals.rb:68:7:68:11 | "bar" | bar |
| literals/literals.rb:69:1:69:14 | "foo #{...}" | foo bar |
| literals/literals.rb:69:9:69:11 | bar | bar |
| literals/literals.rb:70:1:70:14 | "foo #{...}" | foo bar |
| literals/literals.rb:70:9:70:11 | BAR | bar |
| literals/literals.rb:73:1:73:2 | ?x | ?x |
| literals/literals.rb:74:1:74:3 | ?\\n | ?\\n |
| literals/literals.rb:75:1:75:3 | ?\\s | ?\\s |
@@ -431,10 +443,13 @@
| literals/literals.rb:88:8:88:12 | "bar" | bar |
| literals/literals.rb:89:1:89:10 | :"wibble" | wibble |
| literals/literals.rb:90:1:90:17 | :"wibble wobble" | wibble wobble |
| literals/literals.rb:91:1:91:30 | :"foo_#{...}_#{...}_#{...}" | foo_4_bar_bar |
| literals/literals.rb:91:10:91:10 | 2 | 2 |
| literals/literals.rb:91:10:91:14 | ... + ... | 4 |
| literals/literals.rb:91:14:91:14 | 2 | 2 |
| literals/literals.rb:92:1:92:17 | :"foo_#{ 1 + 1 }" | foo_#{ 1 + 1 } |
| literals/literals.rb:91:19:91:21 | bar | bar |
| literals/literals.rb:91:26:91:28 | BAR | bar |
| literals/literals.rb:92:1:92:30 | :"foo_#{ 2 + 2}_#{bar}_#{BAR}" | foo_#{ 2 + 2}_#{bar}_#{BAR} |
| literals/literals.rb:93:1:93:18 | :"foo_#{ 3 - 2 }" | foo_#{ 3 - 2 } |
| literals/literals.rb:97:2:97:2 | 1 | 1 |
| literals/literals.rb:97:5:97:5 | 2 | 2 |
@@ -454,13 +469,20 @@
| literals/literals.rb:104:8:104:10 | "bar" | bar |
| literals/literals.rb:104:12:104:14 | "baz" | baz |
| literals/literals.rb:105:4:105:6 | "foo" | foo |
| literals/literals.rb:105:8:105:16 | "bar#{...}" | bar2 |
| literals/literals.rb:105:13:105:13 | 1 | 1 |
| literals/literals.rb:105:13:105:15 | ... + ... | 2 |
| literals/literals.rb:105:15:105:15 | 1 | 1 |
| literals/literals.rb:105:18:105:20 | "baz" | baz |
| literals/literals.rb:105:18:105:23 | "#{...}" | bar |
| literals/literals.rb:105:20:105:22 | bar | bar |
| literals/literals.rb:105:25:105:30 | "#{...}" | bar |
| literals/literals.rb:105:27:105:29 | BAR | bar |
| literals/literals.rb:105:32:105:34 | "baz" | baz |
| literals/literals.rb:106:4:106:6 | "foo" | foo |
| literals/literals.rb:106:8:106:16 | "bar#{1+1}" | bar#{1+1} |
| literals/literals.rb:106:18:106:20 | "baz" | baz |
| literals/literals.rb:106:18:106:23 | "#{bar}" | #{bar} |
| literals/literals.rb:106:25:106:30 | "#{BAR}" | #{BAR} |
| literals/literals.rb:106:32:106:34 | "baz" | baz |
| literals/literals.rb:110:4:110:6 | :"foo" | foo |
| literals/literals.rb:110:8:110:10 | :"bar" | bar |
| literals/literals.rb:110:12:110:14 | :"baz" | baz |
@@ -468,17 +490,24 @@
| literals/literals.rb:111:8:111:10 | :"bar" | bar |
| literals/literals.rb:111:12:111:14 | :"baz" | baz |
| literals/literals.rb:112:4:112:6 | :"foo" | foo |
| literals/literals.rb:112:8:112:20 | :"bar#{...}" | bar6 |
| literals/literals.rb:112:14:112:14 | 2 | 2 |
| literals/literals.rb:112:14:112:18 | ... + ... | 6 |
| literals/literals.rb:112:18:112:18 | 4 | 4 |
| literals/literals.rb:112:22:112:24 | :"baz" | baz |
| literals/literals.rb:112:22:112:27 | :"#{...}" | bar |
| literals/literals.rb:112:24:112:26 | bar | bar |
| literals/literals.rb:112:29:112:34 | :"#{...}" | bar |
| literals/literals.rb:112:31:112:33 | BAR | bar |
| literals/literals.rb:112:36:112:38 | :"baz" | baz |
| literals/literals.rb:113:4:113:6 | :"foo" | foo |
| literals/literals.rb:113:8:113:12 | :"bar#{" | bar#{ |
| literals/literals.rb:113:14:113:14 | :"2" | 2 |
| literals/literals.rb:113:16:113:16 | :"+" | + |
| literals/literals.rb:113:18:113:18 | :"4" | 4 |
| literals/literals.rb:113:20:113:20 | :"}" | } |
| literals/literals.rb:113:22:113:24 | :"baz" | baz |
| literals/literals.rb:113:22:113:27 | :"#{bar}" | #{bar} |
| literals/literals.rb:113:29:113:34 | :"#{BAR}" | #{BAR} |
| literals/literals.rb:113:36:113:38 | :"baz" | baz |
| literals/literals.rb:117:3:117:5 | :foo | foo |
| literals/literals.rb:117:8:117:8 | 1 | 1 |
| literals/literals.rb:117:11:117:14 | :bar | bar |
@@ -502,9 +531,13 @@
| literals/literals.rb:127:6:127:6 | 1 | 1 |
| literals/literals.rb:130:1:130:7 | `ls -l` | ls -l |
| literals/literals.rb:131:1:131:9 | `ls -l` | ls -l |
| literals/literals.rb:132:1:132:32 | `du -d #{...} #{...} #{...}` | du -d 2 bar bar |
| literals/literals.rb:132:11:132:11 | 1 | 1 |
| literals/literals.rb:132:11:132:15 | ... + ... | 2 |
| literals/literals.rb:132:15:132:15 | 1 | 1 |
| literals/literals.rb:132:21:132:23 | bar | bar |
| literals/literals.rb:132:28:132:30 | BAR | bar |
| literals/literals.rb:133:1:133:20 | `du -d #{...}` | du -d 1 |
| literals/literals.rb:133:13:133:13 | 5 | 5 |
| literals/literals.rb:133:13:133:17 | ... - ... | 1 |
| literals/literals.rb:133:17:133:17 | 4 | 4 |
@@ -512,17 +545,23 @@
| literals/literals.rb:137:1:137:5 | /foo/ | foo |
| literals/literals.rb:138:1:138:6 | /foo/ | foo |
| literals/literals.rb:139:1:139:13 | /foo+\\sbar\\S/ | foo+\\sbar\\S |
| literals/literals.rb:140:1:140:30 | /foo#{...}bar#{...}#{...}/ | foo2barbarbar |
| literals/literals.rb:140:8:140:8 | 1 | 1 |
| literals/literals.rb:140:8:140:12 | ... + ... | 2 |
| literals/literals.rb:140:12:140:12 | 1 | 1 |
| literals/literals.rb:140:20:140:22 | bar | bar |
| literals/literals.rb:140:26:140:28 | BAR | bar |
| literals/literals.rb:141:1:141:8 | /foo/ | foo |
| literals/literals.rb:142:1:142:4 | // | |
| literals/literals.rb:143:1:143:7 | /foo/ | foo |
| literals/literals.rb:144:1:144:8 | /foo/ | foo |
| literals/literals.rb:145:1:145:15 | /foo+\\sbar\\S/ | foo+\\sbar\\S |
| literals/literals.rb:146:1:146:32 | /foo#{...}bar#{...}#{...}/ | foo2barbarbar |
| literals/literals.rb:146:10:146:10 | 1 | 1 |
| literals/literals.rb:146:10:146:14 | ... + ... | 2 |
| literals/literals.rb:146:14:146:14 | 1 | 1 |
| literals/literals.rb:146:22:146:24 | bar | bar |
| literals/literals.rb:146:28:146:30 | BAR | bar |
| literals/literals.rb:147:1:147:10 | /foo/ | foo |
| literals/literals.rb:150:1:150:34 | "abcdefghijklmnopqrstuvwxyzabcdef" | abcdefghijklmnopqrstuvwxyzabcdef |
| literals/literals.rb:151:1:151:35 | "foobarfoobarfoobarfoobarfooba..." | foobarfoobarfoobarfoobarfoobarfoo |
@@ -538,6 +577,7 @@
| misc/misc.rb:3:18:3:21 | foo= | foo= |
| misc/misc.rb:3:24:3:25 | [] | [] |
| misc/misc.rb:3:28:3:30 | []= | []= |
| misc/misc.rb:4:7:4:19 | :"foo_#{...}" | foo_bar |
| misc/misc.rb:4:15:4:17 | bar | bar |
| misc/misc.rb:5:7:5:9 | nil | nil |
| misc/misc.rb:5:12:5:15 | true | true |
@@ -550,6 +590,7 @@
| misc/misc.rb:8:12:8:14 | []= | []= |
| misc/misc.rb:9:7:9:11 | super | super |
| misc/misc.rb:9:13:9:16 | self | self |
| misc/misc.rb:10:7:10:17 | :"\\n#{...}" | \\nbar |
| misc/misc.rb:10:13:10:15 | bar | bar |
| misc/misc.rb:10:19:10:24 | :"foo" | foo |
| modules/classes.rb:11:28:11:31 | :baz | baz |

View File

@@ -35,10 +35,10 @@ allLiterals
| literals.rb:55:1:55:20 | "FOO ' BAR " BAZ'" | StringLiteral | FOO ' BAR " BAZ' |
| literals.rb:56:1:56:12 | "foo\\ bar" | StringLiteral | foo\\ bar |
| literals.rb:57:1:57:12 | "foo\\ bar" | StringLiteral | foo\\ bar |
| literals.rb:58:1:58:20 | "2 + 2 = #{...}" | StringLiteral | <none> |
| literals.rb:58:1:58:20 | "2 + 2 = #{...}" | StringLiteral | 2 + 2 = 4 |
| literals.rb:58:13:58:13 | 2 | IntegerLiteral | 2 |
| literals.rb:58:17:58:17 | 2 | IntegerLiteral | 2 |
| literals.rb:59:1:59:22 | "3 + 4 = #{...}" | StringLiteral | <none> |
| literals.rb:59:1:59:22 | "3 + 4 = #{...}" | StringLiteral | 3 + 4 = 7 |
| literals.rb:59:15:59:15 | 3 | IntegerLiteral | 3 |
| literals.rb:59:19:59:19 | 4 | IntegerLiteral | 4 |
| literals.rb:60:1:60:20 | "2 + 2 = #{ 2 + 2 }" | StringLiteral | 2 + 2 = #{ 2 + 2 } |
@@ -50,17 +50,21 @@ allLiterals
| literals.rb:63:9:63:13 | "bar" | StringLiteral | bar |
| literals.rb:63:15:63:19 | "baz" | StringLiteral | baz |
| literals.rb:64:1:64:5 | "foo" | StringLiteral | foo |
| literals.rb:64:7:64:21 | "bar#{...}" | StringLiteral | <none> |
| literals.rb:64:7:64:21 | "bar#{...}" | StringLiteral | bar1 |
| literals.rb:64:14:64:14 | 1 | IntegerLiteral | 1 |
| literals.rb:64:18:64:18 | 1 | IntegerLiteral | 1 |
| literals.rb:64:23:64:27 | "baz" | StringLiteral | baz |
| literals.rb:65:1:65:35 | "foo #{...} qux" | StringLiteral | <none> |
| literals.rb:65:9:65:28 | "bar #{...} baz" | StringLiteral | <none> |
| literals.rb:65:1:65:35 | "foo #{...} qux" | StringLiteral | foo bar 5 baz qux |
| literals.rb:65:9:65:28 | "bar #{...} baz" | StringLiteral | bar 5 baz |
| literals.rb:65:17:65:17 | 2 | IntegerLiteral | 2 |
| literals.rb:65:21:65:21 | 3 | IntegerLiteral | 3 |
| literals.rb:66:1:66:22 | "foo #{...}" | StringLiteral | <none> |
| literals.rb:66:1:66:22 | "foo #{...}" | StringLiteral | foo 10 |
| literals.rb:66:17:66:17 | 1 | IntegerLiteral | 1 |
| literals.rb:66:19:66:19 | 9 | IntegerLiteral | 9 |
| literals.rb:67:7:67:11 | "bar" | StringLiteral | bar |
| literals.rb:68:7:68:11 | "bar" | StringLiteral | bar |
| literals.rb:69:1:69:14 | "foo #{...}" | StringLiteral | foo bar |
| literals.rb:70:1:70:14 | "foo #{...}" | StringLiteral | foo bar |
| literals.rb:73:1:73:2 | ?x | CharacterLiteral | ?x |
| literals.rb:74:1:74:3 | ?\\n | CharacterLiteral | ?\\n |
| literals.rb:75:1:75:3 | ?\\s | CharacterLiteral | ?\\s |
@@ -79,10 +83,10 @@ allLiterals
| literals.rb:88:8:88:12 | "bar" | StringLiteral | bar |
| literals.rb:89:1:89:10 | :"wibble" | SymbolLiteral | wibble |
| literals.rb:90:1:90:17 | :"wibble wobble" | SymbolLiteral | wibble wobble |
| literals.rb:91:1:91:16 | :"foo_#{...}" | SymbolLiteral | <none> |
| literals.rb:91:1:91:30 | :"foo_#{...}_#{...}_#{...}" | SymbolLiteral | foo_4_bar_bar |
| literals.rb:91:10:91:10 | 2 | IntegerLiteral | 2 |
| literals.rb:91:14:91:14 | 2 | IntegerLiteral | 2 |
| literals.rb:92:1:92:17 | :"foo_#{ 1 + 1 }" | SymbolLiteral | foo_#{ 1 + 1 } |
| literals.rb:92:1:92:30 | :"foo_#{ 2 + 2}_#{bar}_#{BAR}" | SymbolLiteral | foo_#{ 2 + 2}_#{bar}_#{BAR} |
| literals.rb:93:1:93:18 | :"foo_#{ 3 - 2 }" | SymbolLiteral | foo_#{ 3 - 2 } |
| literals.rb:96:1:96:2 | [...] | ArrayLiteral | <none> |
| literals.rb:97:1:97:9 | [...] | ArrayLiteral | <none> |
@@ -108,16 +112,20 @@ allLiterals
| literals.rb:104:4:104:6 | "foo" | StringLiteral | foo |
| literals.rb:104:8:104:10 | "bar" | StringLiteral | bar |
| literals.rb:104:12:104:14 | "baz" | StringLiteral | baz |
| literals.rb:105:1:105:21 | %w(...) | ArrayLiteral | <none> |
| literals.rb:105:1:105:35 | %w(...) | ArrayLiteral | <none> |
| literals.rb:105:4:105:6 | "foo" | StringLiteral | foo |
| literals.rb:105:8:105:16 | "bar#{...}" | StringLiteral | <none> |
| literals.rb:105:8:105:16 | "bar#{...}" | StringLiteral | bar2 |
| literals.rb:105:13:105:13 | 1 | IntegerLiteral | 1 |
| literals.rb:105:15:105:15 | 1 | IntegerLiteral | 1 |
| literals.rb:105:18:105:20 | "baz" | StringLiteral | baz |
| literals.rb:106:1:106:21 | %w(...) | ArrayLiteral | <none> |
| literals.rb:105:18:105:23 | "#{...}" | StringLiteral | bar |
| literals.rb:105:25:105:30 | "#{...}" | StringLiteral | bar |
| literals.rb:105:32:105:34 | "baz" | StringLiteral | baz |
| literals.rb:106:1:106:35 | %w(...) | ArrayLiteral | <none> |
| literals.rb:106:4:106:6 | "foo" | StringLiteral | foo |
| literals.rb:106:8:106:16 | "bar#{1+1}" | StringLiteral | bar#{1+1} |
| literals.rb:106:18:106:20 | "baz" | StringLiteral | baz |
| literals.rb:106:18:106:23 | "#{bar}" | StringLiteral | #{bar} |
| literals.rb:106:25:106:30 | "#{BAR}" | StringLiteral | #{BAR} |
| literals.rb:106:32:106:34 | "baz" | StringLiteral | baz |
| literals.rb:109:1:109:4 | %i(...) | ArrayLiteral | <none> |
| literals.rb:110:1:110:15 | %i(...) | ArrayLiteral | <none> |
| literals.rb:110:4:110:6 | :"foo" | SymbolLiteral | foo |
@@ -127,20 +135,24 @@ allLiterals
| literals.rb:111:4:111:6 | :"foo" | SymbolLiteral | foo |
| literals.rb:111:8:111:10 | :"bar" | SymbolLiteral | bar |
| literals.rb:111:12:111:14 | :"baz" | SymbolLiteral | baz |
| literals.rb:112:1:112:25 | %i(...) | ArrayLiteral | <none> |
| literals.rb:112:1:112:39 | %i(...) | ArrayLiteral | <none> |
| literals.rb:112:4:112:6 | :"foo" | SymbolLiteral | foo |
| literals.rb:112:8:112:20 | :"bar#{...}" | SymbolLiteral | <none> |
| literals.rb:112:8:112:20 | :"bar#{...}" | SymbolLiteral | bar6 |
| literals.rb:112:14:112:14 | 2 | IntegerLiteral | 2 |
| literals.rb:112:18:112:18 | 4 | IntegerLiteral | 4 |
| literals.rb:112:22:112:24 | :"baz" | SymbolLiteral | baz |
| literals.rb:113:1:113:25 | %i(...) | ArrayLiteral | <none> |
| literals.rb:112:22:112:27 | :"#{...}" | SymbolLiteral | bar |
| literals.rb:112:29:112:34 | :"#{...}" | SymbolLiteral | bar |
| literals.rb:112:36:112:38 | :"baz" | SymbolLiteral | baz |
| literals.rb:113:1:113:39 | %i(...) | ArrayLiteral | <none> |
| literals.rb:113:4:113:6 | :"foo" | SymbolLiteral | foo |
| literals.rb:113:8:113:12 | :"bar#{" | SymbolLiteral | bar#{ |
| literals.rb:113:14:113:14 | :"2" | SymbolLiteral | 2 |
| literals.rb:113:16:113:16 | :"+" | SymbolLiteral | + |
| literals.rb:113:18:113:18 | :"4" | SymbolLiteral | 4 |
| literals.rb:113:20:113:20 | :"}" | SymbolLiteral | } |
| literals.rb:113:22:113:24 | :"baz" | SymbolLiteral | baz |
| literals.rb:113:22:113:27 | :"#{bar}" | SymbolLiteral | #{bar} |
| literals.rb:113:29:113:34 | :"#{BAR}" | SymbolLiteral | #{BAR} |
| literals.rb:113:36:113:38 | :"baz" | SymbolLiteral | baz |
| literals.rb:116:1:116:2 | {...} | HashLiteral | <none> |
| literals.rb:117:1:117:33 | {...} | HashLiteral | <none> |
| literals.rb:117:3:117:5 | :foo | SymbolLiteral | foo |
@@ -173,17 +185,17 @@ allLiterals
| literals.rb:127:6:127:6 | 1 | IntegerLiteral | 1 |
| literals.rb:130:1:130:7 | `ls -l` | SubshellLiteral | ls -l |
| literals.rb:131:1:131:9 | `ls -l` | SubshellLiteral | ls -l |
| literals.rb:132:1:132:18 | `du -d #{...}` | SubshellLiteral | <none> |
| literals.rb:132:1:132:32 | `du -d #{...} #{...} #{...}` | SubshellLiteral | du -d 2 bar bar |
| literals.rb:132:11:132:11 | 1 | IntegerLiteral | 1 |
| literals.rb:132:15:132:15 | 1 | IntegerLiteral | 1 |
| literals.rb:133:1:133:20 | `du -d #{...}` | SubshellLiteral | <none> |
| literals.rb:133:1:133:20 | `du -d #{...}` | SubshellLiteral | du -d 1 |
| literals.rb:133:13:133:13 | 5 | IntegerLiteral | 5 |
| literals.rb:133:17:133:17 | 4 | IntegerLiteral | 4 |
| literals.rb:136:1:136:2 | // | RegExpLiteral | |
| literals.rb:137:1:137:5 | /foo/ | RegExpLiteral | foo |
| literals.rb:138:1:138:6 | /foo/ | RegExpLiteral | foo |
| literals.rb:139:1:139:13 | /foo+\\sbar\\S/ | RegExpLiteral | foo+\\sbar\\S |
| literals.rb:140:1:140:18 | /foo#{...}bar/ | RegExpLiteral | <none> |
| literals.rb:140:1:140:30 | /foo#{...}bar#{...}#{...}/ | RegExpLiteral | foo2barbarbar |
| literals.rb:140:8:140:8 | 1 | IntegerLiteral | 1 |
| literals.rb:140:12:140:12 | 1 | IntegerLiteral | 1 |
| literals.rb:141:1:141:8 | /foo/ | RegExpLiteral | foo |
@@ -191,7 +203,7 @@ allLiterals
| literals.rb:143:1:143:7 | /foo/ | RegExpLiteral | foo |
| literals.rb:144:1:144:8 | /foo/ | RegExpLiteral | foo |
| literals.rb:145:1:145:15 | /foo+\\sbar\\S/ | RegExpLiteral | foo+\\sbar\\S |
| literals.rb:146:1:146:20 | /foo#{...}bar/ | RegExpLiteral | <none> |
| literals.rb:146:1:146:32 | /foo#{...}bar#{...}#{...}/ | RegExpLiteral | foo2barbarbar |
| literals.rb:146:10:146:10 | 1 | IntegerLiteral | 1 |
| literals.rb:146:14:146:14 | 1 | IntegerLiteral | 1 |
| literals.rb:147:1:147:10 | /foo/ | RegExpLiteral | foo |
@@ -218,8 +230,8 @@ stringlikeLiterals
| literals.rb:55:1:55:20 | "FOO ' BAR " BAZ'" | FOO ' BAR " BAZ' |
| literals.rb:56:1:56:12 | "foo\\ bar" | foo\\ bar |
| literals.rb:57:1:57:12 | "foo\\ bar" | foo\\ bar |
| literals.rb:58:1:58:20 | "2 + 2 = #{...}" | <none> |
| literals.rb:59:1:59:22 | "3 + 4 = #{...}" | <none> |
| literals.rb:58:1:58:20 | "2 + 2 = #{...}" | 2 + 2 = 4 |
| literals.rb:59:1:59:22 | "3 + 4 = #{...}" | 3 + 4 = 7 |
| literals.rb:60:1:60:20 | "2 + 2 = #{ 2 + 2 }" | 2 + 2 = #{ 2 + 2 } |
| literals.rb:61:1:61:22 | "3 + 4 = #{ 3 + 4 }" | 3 + 4 = #{ 3 + 4 } |
| literals.rb:62:1:62:5 | "foo" | foo |
@@ -229,11 +241,15 @@ stringlikeLiterals
| literals.rb:63:9:63:13 | "bar" | bar |
| literals.rb:63:15:63:19 | "baz" | baz |
| literals.rb:64:1:64:5 | "foo" | foo |
| literals.rb:64:7:64:21 | "bar#{...}" | <none> |
| literals.rb:64:7:64:21 | "bar#{...}" | bar1 |
| literals.rb:64:23:64:27 | "baz" | baz |
| literals.rb:65:1:65:35 | "foo #{...} qux" | <none> |
| literals.rb:65:9:65:28 | "bar #{...} baz" | <none> |
| literals.rb:66:1:66:22 | "foo #{...}" | <none> |
| literals.rb:65:1:65:35 | "foo #{...} qux" | foo bar 5 baz qux |
| literals.rb:65:9:65:28 | "bar #{...} baz" | bar 5 baz |
| literals.rb:66:1:66:22 | "foo #{...}" | foo 10 |
| literals.rb:67:7:67:11 | "bar" | bar |
| literals.rb:68:7:68:11 | "bar" | bar |
| literals.rb:69:1:69:14 | "foo #{...}" | foo bar |
| literals.rb:70:1:70:14 | "foo #{...}" | foo bar |
| literals.rb:84:1:84:3 | :"" | |
| literals.rb:85:1:85:6 | :hello | hello |
| literals.rb:86:1:86:10 | :"foo bar" | foo bar |
@@ -242,8 +258,8 @@ stringlikeLiterals
| literals.rb:88:8:88:12 | "bar" | bar |
| literals.rb:89:1:89:10 | :"wibble" | wibble |
| literals.rb:90:1:90:17 | :"wibble wobble" | wibble wobble |
| literals.rb:91:1:91:16 | :"foo_#{...}" | <none> |
| literals.rb:92:1:92:17 | :"foo_#{ 1 + 1 }" | foo_#{ 1 + 1 } |
| literals.rb:91:1:91:30 | :"foo_#{...}_#{...}_#{...}" | foo_4_bar_bar |
| literals.rb:92:1:92:30 | :"foo_#{ 2 + 2}_#{bar}_#{BAR}" | foo_#{ 2 + 2}_#{bar}_#{BAR} |
| literals.rb:93:1:93:18 | :"foo_#{ 3 - 2 }" | foo_#{ 3 - 2 } |
| literals.rb:103:4:103:6 | "foo" | foo |
| literals.rb:103:8:103:10 | "bar" | bar |
@@ -252,11 +268,15 @@ stringlikeLiterals
| literals.rb:104:8:104:10 | "bar" | bar |
| literals.rb:104:12:104:14 | "baz" | baz |
| literals.rb:105:4:105:6 | "foo" | foo |
| literals.rb:105:8:105:16 | "bar#{...}" | <none> |
| literals.rb:105:18:105:20 | "baz" | baz |
| literals.rb:105:8:105:16 | "bar#{...}" | bar2 |
| literals.rb:105:18:105:23 | "#{...}" | bar |
| literals.rb:105:25:105:30 | "#{...}" | bar |
| literals.rb:105:32:105:34 | "baz" | baz |
| literals.rb:106:4:106:6 | "foo" | foo |
| literals.rb:106:8:106:16 | "bar#{1+1}" | bar#{1+1} |
| literals.rb:106:18:106:20 | "baz" | baz |
| literals.rb:106:18:106:23 | "#{bar}" | #{bar} |
| literals.rb:106:25:106:30 | "#{BAR}" | #{BAR} |
| literals.rb:106:32:106:34 | "baz" | baz |
| literals.rb:110:4:110:6 | :"foo" | foo |
| literals.rb:110:8:110:10 | :"bar" | bar |
| literals.rb:110:12:110:14 | :"baz" | baz |
@@ -264,34 +284,38 @@ stringlikeLiterals
| literals.rb:111:8:111:10 | :"bar" | bar |
| literals.rb:111:12:111:14 | :"baz" | baz |
| literals.rb:112:4:112:6 | :"foo" | foo |
| literals.rb:112:8:112:20 | :"bar#{...}" | <none> |
| literals.rb:112:22:112:24 | :"baz" | baz |
| literals.rb:112:8:112:20 | :"bar#{...}" | bar6 |
| literals.rb:112:22:112:27 | :"#{...}" | bar |
| literals.rb:112:29:112:34 | :"#{...}" | bar |
| literals.rb:112:36:112:38 | :"baz" | baz |
| literals.rb:113:4:113:6 | :"foo" | foo |
| literals.rb:113:8:113:12 | :"bar#{" | bar#{ |
| literals.rb:113:14:113:14 | :"2" | 2 |
| literals.rb:113:16:113:16 | :"+" | + |
| literals.rb:113:18:113:18 | :"4" | 4 |
| literals.rb:113:20:113:20 | :"}" | } |
| literals.rb:113:22:113:24 | :"baz" | baz |
| literals.rb:113:22:113:27 | :"#{bar}" | #{bar} |
| literals.rb:113:29:113:34 | :"#{BAR}" | #{BAR} |
| literals.rb:113:36:113:38 | :"baz" | baz |
| literals.rb:117:3:117:5 | :foo | foo |
| literals.rb:117:11:117:14 | :bar | bar |
| literals.rb:117:22:117:26 | "baz" | baz |
| literals.rb:118:3:118:5 | :foo | foo |
| literals.rb:130:1:130:7 | `ls -l` | ls -l |
| literals.rb:131:1:131:9 | `ls -l` | ls -l |
| literals.rb:132:1:132:18 | `du -d #{...}` | <none> |
| literals.rb:133:1:133:20 | `du -d #{...}` | <none> |
| literals.rb:132:1:132:32 | `du -d #{...} #{...} #{...}` | du -d 2 bar bar |
| literals.rb:133:1:133:20 | `du -d #{...}` | du -d 1 |
| literals.rb:136:1:136:2 | // | |
| literals.rb:137:1:137:5 | /foo/ | foo |
| literals.rb:138:1:138:6 | /foo/ | foo |
| literals.rb:139:1:139:13 | /foo+\\sbar\\S/ | foo+\\sbar\\S |
| literals.rb:140:1:140:18 | /foo#{...}bar/ | <none> |
| literals.rb:140:1:140:30 | /foo#{...}bar#{...}#{...}/ | foo2barbarbar |
| literals.rb:141:1:141:8 | /foo/ | foo |
| literals.rb:142:1:142:4 | // | |
| literals.rb:143:1:143:7 | /foo/ | foo |
| literals.rb:144:1:144:8 | /foo/ | foo |
| literals.rb:145:1:145:15 | /foo+\\sbar\\S/ | foo+\\sbar\\S |
| literals.rb:146:1:146:20 | /foo#{...}bar/ | <none> |
| literals.rb:146:1:146:32 | /foo#{...}bar#{...}#{...}/ | foo2barbarbar |
| literals.rb:147:1:147:10 | /foo/ | foo |
| literals.rb:150:1:150:34 | "abcdefghijklmnopqrstuvwxyzabcdef" | abcdefghijklmnopqrstuvwxyzabcdef |
| literals.rb:151:1:151:35 | "foobarfoobarfoobarfoobarfooba..." | foobarfoobarfoobarfoobarfoobarfoo |
@@ -316,8 +340,8 @@ stringLiterals
| literals.rb:55:1:55:20 | "FOO ' BAR " BAZ'" | FOO ' BAR " BAZ' |
| literals.rb:56:1:56:12 | "foo\\ bar" | foo\\ bar |
| literals.rb:57:1:57:12 | "foo\\ bar" | foo\\ bar |
| literals.rb:58:1:58:20 | "2 + 2 = #{...}" | <none> |
| literals.rb:59:1:59:22 | "3 + 4 = #{...}" | <none> |
| literals.rb:58:1:58:20 | "2 + 2 = #{...}" | 2 + 2 = 4 |
| literals.rb:59:1:59:22 | "3 + 4 = #{...}" | 3 + 4 = 7 |
| literals.rb:60:1:60:20 | "2 + 2 = #{ 2 + 2 }" | 2 + 2 = #{ 2 + 2 } |
| literals.rb:61:1:61:22 | "3 + 4 = #{ 3 + 4 }" | 3 + 4 = #{ 3 + 4 } |
| literals.rb:62:1:62:5 | "foo" | foo |
@@ -327,11 +351,15 @@ stringLiterals
| literals.rb:63:9:63:13 | "bar" | bar |
| literals.rb:63:15:63:19 | "baz" | baz |
| literals.rb:64:1:64:5 | "foo" | foo |
| literals.rb:64:7:64:21 | "bar#{...}" | <none> |
| literals.rb:64:7:64:21 | "bar#{...}" | bar1 |
| literals.rb:64:23:64:27 | "baz" | baz |
| literals.rb:65:1:65:35 | "foo #{...} qux" | <none> |
| literals.rb:65:9:65:28 | "bar #{...} baz" | <none> |
| literals.rb:66:1:66:22 | "foo #{...}" | <none> |
| literals.rb:65:1:65:35 | "foo #{...} qux" | foo bar 5 baz qux |
| literals.rb:65:9:65:28 | "bar #{...} baz" | bar 5 baz |
| literals.rb:66:1:66:22 | "foo #{...}" | foo 10 |
| literals.rb:67:7:67:11 | "bar" | bar |
| literals.rb:68:7:68:11 | "bar" | bar |
| literals.rb:69:1:69:14 | "foo #{...}" | foo bar |
| literals.rb:70:1:70:14 | "foo #{...}" | foo bar |
| literals.rb:88:8:88:12 | "bar" | bar |
| literals.rb:103:4:103:6 | "foo" | foo |
| literals.rb:103:8:103:10 | "bar" | bar |
@@ -340,11 +368,15 @@ stringLiterals
| literals.rb:104:8:104:10 | "bar" | bar |
| literals.rb:104:12:104:14 | "baz" | baz |
| literals.rb:105:4:105:6 | "foo" | foo |
| literals.rb:105:8:105:16 | "bar#{...}" | <none> |
| literals.rb:105:18:105:20 | "baz" | baz |
| literals.rb:105:8:105:16 | "bar#{...}" | bar2 |
| literals.rb:105:18:105:23 | "#{...}" | bar |
| literals.rb:105:25:105:30 | "#{...}" | bar |
| literals.rb:105:32:105:34 | "baz" | baz |
| literals.rb:106:4:106:6 | "foo" | foo |
| literals.rb:106:8:106:16 | "bar#{1+1}" | bar#{1+1} |
| literals.rb:106:18:106:20 | "baz" | baz |
| literals.rb:106:18:106:23 | "#{bar}" | #{bar} |
| literals.rb:106:25:106:30 | "#{BAR}" | #{BAR} |
| literals.rb:106:32:106:34 | "baz" | baz |
| literals.rb:117:22:117:26 | "baz" | baz |
| literals.rb:150:1:150:34 | "abcdefghijklmnopqrstuvwxyzabcdef" | abcdefghijklmnopqrstuvwxyzabcdef |
| literals.rb:151:1:151:35 | "foobarfoobarfoobarfoobarfooba..." | foobarfoobarfoobarfoobarfoobarfoo |
@@ -354,13 +386,13 @@ regExpLiterals
| literals.rb:137:1:137:5 | /foo/ | foo | |
| literals.rb:138:1:138:6 | /foo/ | foo | i |
| literals.rb:139:1:139:13 | /foo+\\sbar\\S/ | foo+\\sbar\\S | |
| literals.rb:140:1:140:18 | /foo#{...}bar/ | <none> | |
| literals.rb:140:1:140:30 | /foo#{...}bar#{...}#{...}/ | foo2barbarbar | |
| literals.rb:141:1:141:8 | /foo/ | foo | oxm |
| literals.rb:142:1:142:4 | // | | |
| literals.rb:143:1:143:7 | /foo/ | foo | |
| literals.rb:144:1:144:8 | /foo/ | foo | i |
| literals.rb:145:1:145:15 | /foo+\\sbar\\S/ | foo+\\sbar\\S | |
| literals.rb:146:1:146:20 | /foo#{...}bar/ | <none> | |
| literals.rb:146:1:146:32 | /foo#{...}bar#{...}#{...}/ | foo2barbarbar | |
| literals.rb:147:1:147:10 | /foo/ | foo | mxo |
symbolLiterals
| literals.rb:84:1:84:3 | :"" | |
@@ -370,8 +402,8 @@ symbolLiterals
| literals.rb:88:3:88:5 | :foo | foo |
| literals.rb:89:1:89:10 | :"wibble" | wibble |
| literals.rb:90:1:90:17 | :"wibble wobble" | wibble wobble |
| literals.rb:91:1:91:16 | :"foo_#{...}" | <none> |
| literals.rb:92:1:92:17 | :"foo_#{ 1 + 1 }" | foo_#{ 1 + 1 } |
| literals.rb:91:1:91:30 | :"foo_#{...}_#{...}_#{...}" | foo_4_bar_bar |
| literals.rb:92:1:92:30 | :"foo_#{ 2 + 2}_#{bar}_#{BAR}" | foo_#{ 2 + 2}_#{bar}_#{BAR} |
| literals.rb:93:1:93:18 | :"foo_#{ 3 - 2 }" | foo_#{ 3 - 2 } |
| literals.rb:110:4:110:6 | :"foo" | foo |
| literals.rb:110:8:110:10 | :"bar" | bar |
@@ -380,23 +412,27 @@ symbolLiterals
| literals.rb:111:8:111:10 | :"bar" | bar |
| literals.rb:111:12:111:14 | :"baz" | baz |
| literals.rb:112:4:112:6 | :"foo" | foo |
| literals.rb:112:8:112:20 | :"bar#{...}" | <none> |
| literals.rb:112:22:112:24 | :"baz" | baz |
| literals.rb:112:8:112:20 | :"bar#{...}" | bar6 |
| literals.rb:112:22:112:27 | :"#{...}" | bar |
| literals.rb:112:29:112:34 | :"#{...}" | bar |
| literals.rb:112:36:112:38 | :"baz" | baz |
| literals.rb:113:4:113:6 | :"foo" | foo |
| literals.rb:113:8:113:12 | :"bar#{" | bar#{ |
| literals.rb:113:14:113:14 | :"2" | 2 |
| literals.rb:113:16:113:16 | :"+" | + |
| literals.rb:113:18:113:18 | :"4" | 4 |
| literals.rb:113:20:113:20 | :"}" | } |
| literals.rb:113:22:113:24 | :"baz" | baz |
| literals.rb:113:22:113:27 | :"#{bar}" | #{bar} |
| literals.rb:113:29:113:34 | :"#{BAR}" | #{BAR} |
| literals.rb:113:36:113:38 | :"baz" | baz |
| literals.rb:117:3:117:5 | :foo | foo |
| literals.rb:117:11:117:14 | :bar | bar |
| literals.rb:118:3:118:5 | :foo | foo |
subshellLiterals
| literals.rb:130:1:130:7 | `ls -l` | ls -l |
| literals.rb:131:1:131:9 | `ls -l` | ls -l |
| literals.rb:132:1:132:18 | `du -d #{...}` | <none> |
| literals.rb:133:1:133:20 | `du -d #{...}` | <none> |
| literals.rb:132:1:132:32 | `du -d #{...} #{...} #{...}` | du -d 2 bar bar |
| literals.rb:133:1:133:20 | `du -d #{...}` | du -d 1 |
stringComponents
| literals.rb:48:1:48:7 | "hello" | StringLiteral | 0 | literals.rb:48:2:48:6 | hello | StringTextComponent |
| literals.rb:49:1:49:9 | "goodbye" | StringLiteral | 0 | literals.rb:49:2:49:8 | goodbye | StringTextComponent |
@@ -436,14 +472,24 @@ stringComponents
| literals.rb:65:9:65:28 | "bar #{...} baz" | StringLiteral | 2 | literals.rb:65:24:65:27 | baz | StringTextComponent |
| literals.rb:66:1:66:22 | "foo #{...}" | StringLiteral | 0 | literals.rb:66:2:66:5 | foo | StringTextComponent |
| literals.rb:66:1:66:22 | "foo #{...}" | StringLiteral | 1 | literals.rb:66:6:66:21 | #{...} | StringInterpolationComponent |
| literals.rb:67:7:67:11 | "bar" | StringLiteral | 0 | literals.rb:67:8:67:10 | bar | StringTextComponent |
| literals.rb:68:7:68:11 | "bar" | StringLiteral | 0 | literals.rb:68:8:68:10 | bar | StringTextComponent |
| literals.rb:69:1:69:14 | "foo #{...}" | StringLiteral | 0 | literals.rb:69:2:69:5 | foo | StringTextComponent |
| literals.rb:69:1:69:14 | "foo #{...}" | StringLiteral | 1 | literals.rb:69:6:69:13 | #{...} | StringInterpolationComponent |
| literals.rb:70:1:70:14 | "foo #{...}" | StringLiteral | 0 | literals.rb:70:2:70:5 | foo | StringTextComponent |
| literals.rb:70:1:70:14 | "foo #{...}" | StringLiteral | 1 | literals.rb:70:6:70:13 | #{...} | StringInterpolationComponent |
| literals.rb:86:1:86:10 | :"foo bar" | SymbolLiteral | 0 | literals.rb:86:3:86:9 | foo bar | StringTextComponent |
| literals.rb:87:1:87:10 | :"bar baz" | SymbolLiteral | 0 | literals.rb:87:3:87:9 | bar baz | StringTextComponent |
| literals.rb:88:8:88:12 | "bar" | StringLiteral | 0 | literals.rb:88:9:88:11 | bar | StringTextComponent |
| literals.rb:89:1:89:10 | :"wibble" | SymbolLiteral | 0 | literals.rb:89:4:89:9 | wibble | StringTextComponent |
| literals.rb:90:1:90:17 | :"wibble wobble" | SymbolLiteral | 0 | literals.rb:90:4:90:16 | wibble wobble | StringTextComponent |
| literals.rb:91:1:91:16 | :"foo_#{...}" | SymbolLiteral | 0 | literals.rb:91:3:91:6 | foo_ | StringTextComponent |
| literals.rb:91:1:91:16 | :"foo_#{...}" | SymbolLiteral | 1 | literals.rb:91:7:91:15 | #{...} | StringInterpolationComponent |
| literals.rb:92:1:92:17 | :"foo_#{ 1 + 1 }" | SymbolLiteral | 0 | literals.rb:92:3:92:16 | foo_#{ 1 + 1 } | StringTextComponent |
| literals.rb:91:1:91:30 | :"foo_#{...}_#{...}_#{...}" | SymbolLiteral | 0 | literals.rb:91:3:91:6 | foo_ | StringTextComponent |
| literals.rb:91:1:91:30 | :"foo_#{...}_#{...}_#{...}" | SymbolLiteral | 1 | literals.rb:91:7:91:15 | #{...} | StringInterpolationComponent |
| literals.rb:91:1:91:30 | :"foo_#{...}_#{...}_#{...}" | SymbolLiteral | 2 | literals.rb:91:16:91:16 | _ | StringTextComponent |
| literals.rb:91:1:91:30 | :"foo_#{...}_#{...}_#{...}" | SymbolLiteral | 3 | literals.rb:91:17:91:22 | #{...} | StringInterpolationComponent |
| literals.rb:91:1:91:30 | :"foo_#{...}_#{...}_#{...}" | SymbolLiteral | 4 | literals.rb:91:23:91:23 | _ | StringTextComponent |
| literals.rb:91:1:91:30 | :"foo_#{...}_#{...}_#{...}" | SymbolLiteral | 5 | literals.rb:91:24:91:29 | #{...} | StringInterpolationComponent |
| literals.rb:92:1:92:30 | :"foo_#{ 2 + 2}_#{bar}_#{BAR}" | SymbolLiteral | 0 | literals.rb:92:3:92:29 | foo_#{ 2 + 2}_#{bar}_#{BAR} | StringTextComponent |
| literals.rb:93:1:93:18 | :"foo_#{ 3 - 2 }" | SymbolLiteral | 0 | literals.rb:93:4:93:17 | foo_#{ 3 - 2 } | StringTextComponent |
| literals.rb:103:4:103:6 | "foo" | StringLiteral | 0 | literals.rb:103:4:103:6 | foo | StringTextComponent |
| literals.rb:103:8:103:10 | "bar" | StringLiteral | 0 | literals.rb:103:8:103:10 | bar | StringTextComponent |
@@ -454,10 +500,14 @@ stringComponents
| literals.rb:105:4:105:6 | "foo" | StringLiteral | 0 | literals.rb:105:4:105:6 | foo | StringTextComponent |
| literals.rb:105:8:105:16 | "bar#{...}" | StringLiteral | 0 | literals.rb:105:8:105:10 | bar | StringTextComponent |
| literals.rb:105:8:105:16 | "bar#{...}" | StringLiteral | 1 | literals.rb:105:11:105:16 | #{...} | StringInterpolationComponent |
| literals.rb:105:18:105:20 | "baz" | StringLiteral | 0 | literals.rb:105:18:105:20 | baz | StringTextComponent |
| literals.rb:105:18:105:23 | "#{...}" | StringLiteral | 0 | literals.rb:105:18:105:23 | #{...} | StringInterpolationComponent |
| literals.rb:105:25:105:30 | "#{...}" | StringLiteral | 0 | literals.rb:105:25:105:30 | #{...} | StringInterpolationComponent |
| literals.rb:105:32:105:34 | "baz" | StringLiteral | 0 | literals.rb:105:32:105:34 | baz | StringTextComponent |
| literals.rb:106:4:106:6 | "foo" | StringLiteral | 0 | literals.rb:106:4:106:6 | foo | StringTextComponent |
| literals.rb:106:8:106:16 | "bar#{1+1}" | StringLiteral | 0 | literals.rb:106:8:106:16 | bar#{1+1} | StringTextComponent |
| literals.rb:106:18:106:20 | "baz" | StringLiteral | 0 | literals.rb:106:18:106:20 | baz | StringTextComponent |
| literals.rb:106:18:106:23 | "#{bar}" | StringLiteral | 0 | literals.rb:106:18:106:23 | #{bar} | StringTextComponent |
| literals.rb:106:25:106:30 | "#{BAR}" | StringLiteral | 0 | literals.rb:106:25:106:30 | #{BAR} | StringTextComponent |
| literals.rb:106:32:106:34 | "baz" | StringLiteral | 0 | literals.rb:106:32:106:34 | baz | StringTextComponent |
| literals.rb:110:4:110:6 | :"foo" | SymbolLiteral | 0 | literals.rb:110:4:110:6 | foo | StringTextComponent |
| literals.rb:110:8:110:10 | :"bar" | SymbolLiteral | 0 | literals.rb:110:8:110:10 | bar | StringTextComponent |
| literals.rb:110:12:110:14 | :"baz" | SymbolLiteral | 0 | literals.rb:110:12:110:14 | baz | StringTextComponent |
@@ -467,19 +517,27 @@ stringComponents
| literals.rb:112:4:112:6 | :"foo" | SymbolLiteral | 0 | literals.rb:112:4:112:6 | foo | StringTextComponent |
| literals.rb:112:8:112:20 | :"bar#{...}" | SymbolLiteral | 0 | literals.rb:112:8:112:10 | bar | StringTextComponent |
| literals.rb:112:8:112:20 | :"bar#{...}" | SymbolLiteral | 1 | literals.rb:112:11:112:20 | #{...} | StringInterpolationComponent |
| literals.rb:112:22:112:24 | :"baz" | SymbolLiteral | 0 | literals.rb:112:22:112:24 | baz | StringTextComponent |
| literals.rb:112:22:112:27 | :"#{...}" | SymbolLiteral | 0 | literals.rb:112:22:112:27 | #{...} | StringInterpolationComponent |
| literals.rb:112:29:112:34 | :"#{...}" | SymbolLiteral | 0 | literals.rb:112:29:112:34 | #{...} | StringInterpolationComponent |
| literals.rb:112:36:112:38 | :"baz" | SymbolLiteral | 0 | literals.rb:112:36:112:38 | baz | StringTextComponent |
| literals.rb:113:4:113:6 | :"foo" | SymbolLiteral | 0 | literals.rb:113:4:113:6 | foo | StringTextComponent |
| literals.rb:113:8:113:12 | :"bar#{" | SymbolLiteral | 0 | literals.rb:113:8:113:12 | bar#{ | StringTextComponent |
| literals.rb:113:14:113:14 | :"2" | SymbolLiteral | 0 | literals.rb:113:14:113:14 | 2 | StringTextComponent |
| literals.rb:113:16:113:16 | :"+" | SymbolLiteral | 0 | literals.rb:113:16:113:16 | + | StringTextComponent |
| literals.rb:113:18:113:18 | :"4" | SymbolLiteral | 0 | literals.rb:113:18:113:18 | 4 | StringTextComponent |
| literals.rb:113:20:113:20 | :"}" | SymbolLiteral | 0 | literals.rb:113:20:113:20 | } | StringTextComponent |
| literals.rb:113:22:113:24 | :"baz" | SymbolLiteral | 0 | literals.rb:113:22:113:24 | baz | StringTextComponent |
| literals.rb:113:22:113:27 | :"#{bar}" | SymbolLiteral | 0 | literals.rb:113:22:113:27 | #{bar} | StringTextComponent |
| literals.rb:113:29:113:34 | :"#{BAR}" | SymbolLiteral | 0 | literals.rb:113:29:113:34 | #{BAR} | StringTextComponent |
| literals.rb:113:36:113:38 | :"baz" | SymbolLiteral | 0 | literals.rb:113:36:113:38 | baz | StringTextComponent |
| literals.rb:117:22:117:26 | "baz" | StringLiteral | 0 | literals.rb:117:23:117:25 | baz | StringTextComponent |
| literals.rb:130:1:130:7 | `ls -l` | SubshellLiteral | 0 | literals.rb:130:2:130:6 | ls -l | StringTextComponent |
| literals.rb:131:1:131:9 | `ls -l` | SubshellLiteral | 0 | literals.rb:131:4:131:8 | ls -l | StringTextComponent |
| literals.rb:132:1:132:18 | `du -d #{...}` | SubshellLiteral | 0 | literals.rb:132:2:132:7 | du -d | StringTextComponent |
| literals.rb:132:1:132:18 | `du -d #{...}` | SubshellLiteral | 1 | literals.rb:132:8:132:17 | #{...} | StringInterpolationComponent |
| literals.rb:132:1:132:32 | `du -d #{...} #{...} #{...}` | SubshellLiteral | 0 | literals.rb:132:2:132:7 | du -d | StringTextComponent |
| literals.rb:132:1:132:32 | `du -d #{...} #{...} #{...}` | SubshellLiteral | 1 | literals.rb:132:8:132:17 | #{...} | StringInterpolationComponent |
| literals.rb:132:1:132:32 | `du -d #{...} #{...} #{...}` | SubshellLiteral | 2 | literals.rb:132:18:132:18 | | StringTextComponent |
| literals.rb:132:1:132:32 | `du -d #{...} #{...} #{...}` | SubshellLiteral | 3 | literals.rb:132:19:132:24 | #{...} | StringInterpolationComponent |
| literals.rb:132:1:132:32 | `du -d #{...} #{...} #{...}` | SubshellLiteral | 4 | literals.rb:132:25:132:25 | | StringTextComponent |
| literals.rb:132:1:132:32 | `du -d #{...} #{...} #{...}` | SubshellLiteral | 5 | literals.rb:132:26:132:31 | #{...} | StringInterpolationComponent |
| literals.rb:133:1:133:20 | `du -d #{...}` | SubshellLiteral | 0 | literals.rb:133:4:133:9 | du -d | StringTextComponent |
| literals.rb:133:1:133:20 | `du -d #{...}` | SubshellLiteral | 1 | literals.rb:133:10:133:19 | #{...} | StringInterpolationComponent |
| literals.rb:137:1:137:5 | /foo/ | RegExpLiteral | 0 | literals.rb:137:2:137:4 | foo | StringTextComponent |
@@ -488,9 +546,11 @@ stringComponents
| literals.rb:139:1:139:13 | /foo+\\sbar\\S/ | RegExpLiteral | 1 | literals.rb:139:6:139:7 | \\s | StringEscapeSequenceComponent |
| literals.rb:139:1:139:13 | /foo+\\sbar\\S/ | RegExpLiteral | 2 | literals.rb:139:8:139:10 | bar | StringTextComponent |
| literals.rb:139:1:139:13 | /foo+\\sbar\\S/ | RegExpLiteral | 3 | literals.rb:139:11:139:12 | \\S | StringEscapeSequenceComponent |
| literals.rb:140:1:140:18 | /foo#{...}bar/ | RegExpLiteral | 0 | literals.rb:140:2:140:4 | foo | StringTextComponent |
| literals.rb:140:1:140:18 | /foo#{...}bar/ | RegExpLiteral | 1 | literals.rb:140:5:140:14 | #{...} | StringInterpolationComponent |
| literals.rb:140:1:140:18 | /foo#{...}bar/ | RegExpLiteral | 2 | literals.rb:140:15:140:17 | bar | StringTextComponent |
| literals.rb:140:1:140:30 | /foo#{...}bar#{...}#{...}/ | RegExpLiteral | 0 | literals.rb:140:2:140:4 | foo | StringTextComponent |
| literals.rb:140:1:140:30 | /foo#{...}bar#{...}#{...}/ | RegExpLiteral | 1 | literals.rb:140:5:140:14 | #{...} | StringInterpolationComponent |
| literals.rb:140:1:140:30 | /foo#{...}bar#{...}#{...}/ | RegExpLiteral | 2 | literals.rb:140:15:140:17 | bar | StringTextComponent |
| literals.rb:140:1:140:30 | /foo#{...}bar#{...}#{...}/ | RegExpLiteral | 3 | literals.rb:140:18:140:23 | #{...} | StringInterpolationComponent |
| literals.rb:140:1:140:30 | /foo#{...}bar#{...}#{...}/ | RegExpLiteral | 4 | literals.rb:140:24:140:29 | #{...} | StringInterpolationComponent |
| literals.rb:141:1:141:8 | /foo/ | RegExpLiteral | 0 | literals.rb:141:2:141:4 | foo | StringTextComponent |
| literals.rb:143:1:143:7 | /foo/ | RegExpLiteral | 0 | literals.rb:143:4:143:6 | foo | StringTextComponent |
| literals.rb:144:1:144:8 | /foo/ | RegExpLiteral | 0 | literals.rb:144:4:144:6 | foo | StringTextComponent |
@@ -498,9 +558,11 @@ stringComponents
| literals.rb:145:1:145:15 | /foo+\\sbar\\S/ | RegExpLiteral | 1 | literals.rb:145:8:145:9 | \\s | StringEscapeSequenceComponent |
| literals.rb:145:1:145:15 | /foo+\\sbar\\S/ | RegExpLiteral | 2 | literals.rb:145:10:145:12 | bar | StringTextComponent |
| literals.rb:145:1:145:15 | /foo+\\sbar\\S/ | RegExpLiteral | 3 | literals.rb:145:13:145:14 | \\S | StringEscapeSequenceComponent |
| literals.rb:146:1:146:20 | /foo#{...}bar/ | RegExpLiteral | 0 | literals.rb:146:4:146:6 | foo | StringTextComponent |
| literals.rb:146:1:146:20 | /foo#{...}bar/ | RegExpLiteral | 1 | literals.rb:146:7:146:16 | #{...} | StringInterpolationComponent |
| literals.rb:146:1:146:20 | /foo#{...}bar/ | RegExpLiteral | 2 | literals.rb:146:17:146:19 | bar | StringTextComponent |
| literals.rb:146:1:146:32 | /foo#{...}bar#{...}#{...}/ | RegExpLiteral | 0 | literals.rb:146:4:146:6 | foo | StringTextComponent |
| literals.rb:146:1:146:32 | /foo#{...}bar#{...}#{...}/ | RegExpLiteral | 1 | literals.rb:146:7:146:16 | #{...} | StringInterpolationComponent |
| literals.rb:146:1:146:32 | /foo#{...}bar#{...}#{...}/ | RegExpLiteral | 2 | literals.rb:146:17:146:19 | bar | StringTextComponent |
| literals.rb:146:1:146:32 | /foo#{...}bar#{...}#{...}/ | RegExpLiteral | 3 | literals.rb:146:20:146:25 | #{...} | StringInterpolationComponent |
| literals.rb:146:1:146:32 | /foo#{...}bar#{...}#{...}/ | RegExpLiteral | 4 | literals.rb:146:26:146:31 | #{...} | StringInterpolationComponent |
| literals.rb:147:1:147:10 | /foo/ | RegExpLiteral | 0 | literals.rb:147:4:147:6 | foo | StringTextComponent |
| literals.rb:150:1:150:34 | "abcdefghijklmnopqrstuvwxyzabcdef" | StringLiteral | 0 | literals.rb:150:2:150:33 | abcdefghijklmnopqrstuvwxyzabcdef | StringTextComponent |
| literals.rb:151:1:151:35 | "foobarfoobarfoobarfoobarfooba..." | StringLiteral | 0 | literals.rb:151:2:151:34 | foobarfoobarfoobarfoobarfoobarfoo | StringTextComponent |
@@ -536,13 +598,27 @@ stringInterpolations
| literals.rb:65:14:65:23 | #{...} | 0 | literals.rb:65:17:65:21 | ... + ... | AddExpr |
| literals.rb:66:6:66:21 | #{...} | 0 | literals.rb:66:9:66:14 | call to blah | MethodCall |
| literals.rb:66:6:66:21 | #{...} | 1 | literals.rb:66:17:66:19 | ... + ... | AddExpr |
| literals.rb:69:6:69:13 | #{...} | 0 | literals.rb:69:9:69:11 | bar | LocalVariableAccess |
| literals.rb:70:6:70:13 | #{...} | 0 | literals.rb:70:9:70:11 | BAR | ConstantReadAccess |
| literals.rb:91:7:91:15 | #{...} | 0 | literals.rb:91:10:91:14 | ... + ... | AddExpr |
| literals.rb:91:17:91:22 | #{...} | 0 | literals.rb:91:19:91:21 | bar | LocalVariableAccess |
| literals.rb:91:24:91:29 | #{...} | 0 | literals.rb:91:26:91:28 | BAR | ConstantReadAccess |
| literals.rb:105:11:105:16 | #{...} | 0 | literals.rb:105:13:105:15 | ... + ... | AddExpr |
| literals.rb:105:18:105:23 | #{...} | 0 | literals.rb:105:20:105:22 | bar | LocalVariableAccess |
| literals.rb:105:25:105:30 | #{...} | 0 | literals.rb:105:27:105:29 | BAR | ConstantReadAccess |
| literals.rb:112:11:112:20 | #{...} | 0 | literals.rb:112:14:112:18 | ... + ... | AddExpr |
| literals.rb:112:22:112:27 | #{...} | 0 | literals.rb:112:24:112:26 | bar | LocalVariableAccess |
| literals.rb:112:29:112:34 | #{...} | 0 | literals.rb:112:31:112:33 | BAR | ConstantReadAccess |
| literals.rb:132:8:132:17 | #{...} | 0 | literals.rb:132:11:132:15 | ... + ... | AddExpr |
| literals.rb:132:19:132:24 | #{...} | 0 | literals.rb:132:21:132:23 | bar | LocalVariableAccess |
| literals.rb:132:26:132:31 | #{...} | 0 | literals.rb:132:28:132:30 | BAR | ConstantReadAccess |
| literals.rb:133:10:133:19 | #{...} | 0 | literals.rb:133:13:133:17 | ... - ... | SubExpr |
| literals.rb:140:5:140:14 | #{...} | 0 | literals.rb:140:8:140:12 | ... + ... | AddExpr |
| literals.rb:140:18:140:23 | #{...} | 0 | literals.rb:140:20:140:22 | bar | LocalVariableAccess |
| literals.rb:140:24:140:29 | #{...} | 0 | literals.rb:140:26:140:28 | BAR | ConstantReadAccess |
| literals.rb:146:7:146:16 | #{...} | 0 | literals.rb:146:10:146:14 | ... + ... | AddExpr |
| literals.rb:146:20:146:25 | #{...} | 0 | literals.rb:146:22:146:24 | bar | LocalVariableAccess |
| literals.rb:146:26:146:31 | #{...} | 0 | literals.rb:146:28:146:30 | BAR | ConstantReadAccess |
| literals.rb:158:14:158:22 | #{...} | 0 | literals.rb:158:17:158:20 | call to name | MethodCall |
| literals.rb:172:12:172:29 | #{...} | 0 | literals.rb:172:15:172:27 | call to interpolation | MethodCall |
| literals.rb:177:15:177:32 | #{...} | 0 | literals.rb:177:18:177:30 | call to interpolation | MethodCall |
@@ -553,9 +629,9 @@ concatenatedStrings
| literals.rb:63:1:63:19 | "..." "..." | foobarbaz | 0 | literals.rb:63:1:63:7 | "foo" |
| literals.rb:63:1:63:19 | "..." "..." | foobarbaz | 1 | literals.rb:63:9:63:13 | "bar" |
| literals.rb:63:1:63:19 | "..." "..." | foobarbaz | 2 | literals.rb:63:15:63:19 | "baz" |
| literals.rb:64:1:64:27 | "..." "..." | <none> | 0 | literals.rb:64:1:64:5 | "foo" |
| literals.rb:64:1:64:27 | "..." "..." | <none> | 1 | literals.rb:64:7:64:21 | "bar#{...}" |
| literals.rb:64:1:64:27 | "..." "..." | <none> | 2 | literals.rb:64:23:64:27 | "baz" |
| literals.rb:64:1:64:27 | "..." "..." | foobar1baz | 0 | literals.rb:64:1:64:5 | "foo" |
| literals.rb:64:1:64:27 | "..." "..." | foobar1baz | 1 | literals.rb:64:7:64:21 | "bar#{...}" |
| literals.rb:64:1:64:27 | "..." "..." | foobar1baz | 2 | literals.rb:64:23:64:27 | "baz" |
arrayLiterals
| literals.rb:96:1:96:2 | [...] | 0 |
| literals.rb:97:1:97:9 | [...] | 3 |
@@ -565,13 +641,13 @@ arrayLiterals
| literals.rb:102:1:102:4 | %w(...) | 0 |
| literals.rb:103:1:103:15 | %w(...) | 3 |
| literals.rb:104:1:104:15 | %w(...) | 3 |
| literals.rb:105:1:105:21 | %w(...) | 3 |
| literals.rb:106:1:106:21 | %w(...) | 3 |
| literals.rb:105:1:105:35 | %w(...) | 5 |
| literals.rb:106:1:106:35 | %w(...) | 5 |
| literals.rb:109:1:109:4 | %i(...) | 0 |
| literals.rb:110:1:110:15 | %i(...) | 3 |
| literals.rb:111:1:111:15 | %i(...) | 3 |
| literals.rb:112:1:112:25 | %i(...) | 3 |
| literals.rb:113:1:113:25 | %i(...) | 7 |
| literals.rb:112:1:112:39 | %i(...) | 5 |
| literals.rb:113:1:113:39 | %i(...) | 9 |
arrayLiteralElements
| literals.rb:97:1:97:9 | [...] | 0 | literals.rb:97:2:97:2 | 1 | IntegerLiteral |
| literals.rb:97:1:97:9 | [...] | 1 | literals.rb:97:5:97:5 | 2 | IntegerLiteral |
@@ -589,28 +665,36 @@ arrayLiteralElements
| literals.rb:104:1:104:15 | %w(...) | 0 | literals.rb:104:4:104:6 | "foo" | StringLiteral |
| literals.rb:104:1:104:15 | %w(...) | 1 | literals.rb:104:8:104:10 | "bar" | StringLiteral |
| literals.rb:104:1:104:15 | %w(...) | 2 | literals.rb:104:12:104:14 | "baz" | StringLiteral |
| literals.rb:105:1:105:21 | %w(...) | 0 | literals.rb:105:4:105:6 | "foo" | StringLiteral |
| literals.rb:105:1:105:21 | %w(...) | 1 | literals.rb:105:8:105:16 | "bar#{...}" | StringLiteral |
| literals.rb:105:1:105:21 | %w(...) | 2 | literals.rb:105:18:105:20 | "baz" | StringLiteral |
| literals.rb:106:1:106:21 | %w(...) | 0 | literals.rb:106:4:106:6 | "foo" | StringLiteral |
| literals.rb:106:1:106:21 | %w(...) | 1 | literals.rb:106:8:106:16 | "bar#{1+1}" | StringLiteral |
| literals.rb:106:1:106:21 | %w(...) | 2 | literals.rb:106:18:106:20 | "baz" | StringLiteral |
| literals.rb:105:1:105:35 | %w(...) | 0 | literals.rb:105:4:105:6 | "foo" | StringLiteral |
| literals.rb:105:1:105:35 | %w(...) | 1 | literals.rb:105:8:105:16 | "bar#{...}" | StringLiteral |
| literals.rb:105:1:105:35 | %w(...) | 2 | literals.rb:105:18:105:23 | "#{...}" | StringLiteral |
| literals.rb:105:1:105:35 | %w(...) | 3 | literals.rb:105:25:105:30 | "#{...}" | StringLiteral |
| literals.rb:105:1:105:35 | %w(...) | 4 | literals.rb:105:32:105:34 | "baz" | StringLiteral |
| literals.rb:106:1:106:35 | %w(...) | 0 | literals.rb:106:4:106:6 | "foo" | StringLiteral |
| literals.rb:106:1:106:35 | %w(...) | 1 | literals.rb:106:8:106:16 | "bar#{1+1}" | StringLiteral |
| literals.rb:106:1:106:35 | %w(...) | 2 | literals.rb:106:18:106:23 | "#{bar}" | StringLiteral |
| literals.rb:106:1:106:35 | %w(...) | 3 | literals.rb:106:25:106:30 | "#{BAR}" | StringLiteral |
| literals.rb:106:1:106:35 | %w(...) | 4 | literals.rb:106:32:106:34 | "baz" | StringLiteral |
| literals.rb:110:1:110:15 | %i(...) | 0 | literals.rb:110:4:110:6 | :"foo" | SymbolLiteral |
| literals.rb:110:1:110:15 | %i(...) | 1 | literals.rb:110:8:110:10 | :"bar" | SymbolLiteral |
| literals.rb:110:1:110:15 | %i(...) | 2 | literals.rb:110:12:110:14 | :"baz" | SymbolLiteral |
| literals.rb:111:1:111:15 | %i(...) | 0 | literals.rb:111:4:111:6 | :"foo" | SymbolLiteral |
| literals.rb:111:1:111:15 | %i(...) | 1 | literals.rb:111:8:111:10 | :"bar" | SymbolLiteral |
| literals.rb:111:1:111:15 | %i(...) | 2 | literals.rb:111:12:111:14 | :"baz" | SymbolLiteral |
| literals.rb:112:1:112:25 | %i(...) | 0 | literals.rb:112:4:112:6 | :"foo" | SymbolLiteral |
| literals.rb:112:1:112:25 | %i(...) | 1 | literals.rb:112:8:112:20 | :"bar#{...}" | SymbolLiteral |
| literals.rb:112:1:112:25 | %i(...) | 2 | literals.rb:112:22:112:24 | :"baz" | SymbolLiteral |
| literals.rb:113:1:113:25 | %i(...) | 0 | literals.rb:113:4:113:6 | :"foo" | SymbolLiteral |
| literals.rb:113:1:113:25 | %i(...) | 1 | literals.rb:113:8:113:12 | :"bar#{" | SymbolLiteral |
| literals.rb:113:1:113:25 | %i(...) | 2 | literals.rb:113:14:113:14 | :"2" | SymbolLiteral |
| literals.rb:113:1:113:25 | %i(...) | 3 | literals.rb:113:16:113:16 | :"+" | SymbolLiteral |
| literals.rb:113:1:113:25 | %i(...) | 4 | literals.rb:113:18:113:18 | :"4" | SymbolLiteral |
| literals.rb:113:1:113:25 | %i(...) | 5 | literals.rb:113:20:113:20 | :"}" | SymbolLiteral |
| literals.rb:113:1:113:25 | %i(...) | 6 | literals.rb:113:22:113:24 | :"baz" | SymbolLiteral |
| literals.rb:112:1:112:39 | %i(...) | 0 | literals.rb:112:4:112:6 | :"foo" | SymbolLiteral |
| literals.rb:112:1:112:39 | %i(...) | 1 | literals.rb:112:8:112:20 | :"bar#{...}" | SymbolLiteral |
| literals.rb:112:1:112:39 | %i(...) | 2 | literals.rb:112:22:112:27 | :"#{...}" | SymbolLiteral |
| literals.rb:112:1:112:39 | %i(...) | 3 | literals.rb:112:29:112:34 | :"#{...}" | SymbolLiteral |
| literals.rb:112:1:112:39 | %i(...) | 4 | literals.rb:112:36:112:38 | :"baz" | SymbolLiteral |
| literals.rb:113:1:113:39 | %i(...) | 0 | literals.rb:113:4:113:6 | :"foo" | SymbolLiteral |
| literals.rb:113:1:113:39 | %i(...) | 1 | literals.rb:113:8:113:12 | :"bar#{" | SymbolLiteral |
| literals.rb:113:1:113:39 | %i(...) | 2 | literals.rb:113:14:113:14 | :"2" | SymbolLiteral |
| literals.rb:113:1:113:39 | %i(...) | 3 | literals.rb:113:16:113:16 | :"+" | SymbolLiteral |
| literals.rb:113:1:113:39 | %i(...) | 4 | literals.rb:113:18:113:18 | :"4" | SymbolLiteral |
| literals.rb:113:1:113:39 | %i(...) | 5 | literals.rb:113:20:113:20 | :"}" | SymbolLiteral |
| literals.rb:113:1:113:39 | %i(...) | 6 | literals.rb:113:22:113:27 | :"#{bar}" | SymbolLiteral |
| literals.rb:113:1:113:39 | %i(...) | 7 | literals.rb:113:29:113:34 | :"#{BAR}" | SymbolLiteral |
| literals.rb:113:1:113:39 | %i(...) | 8 | literals.rb:113:36:113:38 | :"baz" | SymbolLiteral |
hashLiterals
| literals.rb:88:1:88:14 | {...} | 1 |
| literals.rb:116:1:116:2 | {...} | 0 |

View File

@@ -64,10 +64,10 @@ TRUE
"foo" "bar#{ 1 * 1 }" 'baz' # concatenated, interpolation
"foo #{ "bar #{ 2 + 3 } baz" } qux" # interpolation containing string containing interpolation
"foo #{ blah(); 1+9 }" # multiple statements in interpolation
bar = "bar"
BAR = "bar"
"foo #{ bar }" # local variables in interpolation
"foo #{ BAR }" # constants in interpolation
# characters
?x
@@ -88,8 +88,8 @@ TRUE
{ foo: "bar" }
%s(wibble)
%s[wibble wobble]
:"foo_#{ 2 + 2}" # interpolation
:'foo_#{ 1 + 1 }' # no interpolation
:"foo_#{ 2 + 2}_#{bar}_#{BAR}" # interpolation
:'foo_#{ 2 + 2}_#{bar}_#{BAR}' # no interpolation
%s(foo_#{ 3 - 2 }) # no interpolation
# arrays
@@ -102,20 +102,20 @@ TRUE
%w()
%w(foo bar baz)
%w!foo bar baz!
%W[foo bar#{1+1} baz] # interpolation
%w[foo bar#{1+1} baz] # no interpolation
%W[foo bar#{1+1} #{bar} #{BAR} baz] # interpolation
%w[foo bar#{1+1} #{bar} #{BAR} baz] # no interpolation
# arrays of symbols
%i()
%i(foo bar baz)
%i@foo bar baz@
%I(foo bar#{ 2 + 4 } baz) # interpolation
%i(foo bar#{ 2 + 4 } baz) # no interpolation
%I(foo bar#{ 2 + 4 } #{bar} #{BAR} baz) # interpolation
%i(foo bar#{ 2 + 4 } #{bar} #{BAR} baz) # no interpolation
# hashes
{}
{ foo: 1, :bar => 2, 'baz' => 3 }
{ foo: 7, **bar } # hash-splat argument
{ foo: 7, **baz } # hash-splat argument
# ranges
(1..10)
@@ -129,21 +129,21 @@ TRUE
# subshell
`ls -l`
%x(ls -l)
`du -d #{ 1 + 1 }` # interpolation
%x@du -d #{ 5 - 4 }@ # interpolation
`du -d #{ 1 + 1 } #{bar} #{BAR}` # interpolation
%x@du -d #{ 5 - 4 }@ # interpolation
# regular expressions
//
/foo/
/foo/i
/foo+\sbar\S/
/foo#{ 1 + 1 }bar/ # interpolation
/foo#{ 1 + 1 }bar#{bar}#{BAR}/ # interpolation
/foo/oxm
%r[]
%r(foo)
%r:foo:i
%r{foo+\sbar\S}
%r{foo#{ 1 + 1 }bar} # interpolation
%r{foo#{ 1 + 1 }bar#{bar}#{BAR}} # interpolation
%r:foo:mxo
# long strings

View File

@@ -4,7 +4,7 @@ undef
| misc.rb:3:1:3:30 | undef ... | 2 | misc.rb:3:18:3:21 | foo= | foo= | MethodName |
| misc.rb:3:1:3:30 | undef ... | 3 | misc.rb:3:24:3:25 | [] | [] | MethodName |
| misc.rb:3:1:3:30 | undef ... | 4 | misc.rb:3:28:3:30 | []= | []= | MethodName |
| misc.rb:4:1:4:19 | undef ... | 0 | misc.rb:4:7:4:19 | :"foo_#{...}" | (none) | MethodName |
| misc.rb:4:1:4:19 | undef ... | 0 | misc.rb:4:7:4:19 | :"foo_#{...}" | foo_bar | MethodName |
| misc.rb:5:1:5:35 | undef ... | 0 | misc.rb:5:7:5:9 | nil | nil | MethodName |
| misc.rb:5:1:5:35 | undef ... | 1 | misc.rb:5:12:5:15 | true | true | MethodName |
| misc.rb:5:1:5:35 | undef ... | 2 | misc.rb:5:18:5:22 | false | false | MethodName |
@@ -17,5 +17,5 @@ alias
| misc.rb:8:1:8:14 | alias ... | old | misc.rb:8:12:8:14 | []= | []= | MethodName |
| misc.rb:9:1:9:16 | alias ... | new | misc.rb:9:7:9:11 | super | super | MethodName |
| misc.rb:9:1:9:16 | alias ... | old | misc.rb:9:13:9:16 | self | self | MethodName |
| misc.rb:10:1:10:24 | alias ... | new | misc.rb:10:7:10:17 | :"\\n#{...}" | (none) | MethodName |
| misc.rb:10:1:10:24 | alias ... | new | misc.rb:10:7:10:17 | :"\\n#{...}" | \\nbar | MethodName |
| misc.rb:10:1:10:24 | alias ... | old | misc.rb:10:19:10:24 | :"foo" | foo | MethodName |

View File

@@ -582,3 +582,14 @@ regexp.rb:
# 71| [RegExpConstant, RegExpNormalChar] f
# 74| [RegExpNamedCharacterProperty] [:digit:]
# 78| [RegExpConstant, RegExpNormalChar] a
# 78| [RegExpSequence] abc
#-----| 0 -> [RegExpConstant, RegExpNormalChar] a
#-----| 1 -> [RegExpConstant, RegExpNormalChar] b
#-----| 2 -> [RegExpConstant, RegExpNormalChar] c
# 78| [RegExpConstant, RegExpNormalChar] b
# 78| [RegExpConstant, RegExpNormalChar] c

View File

@@ -71,4 +71,8 @@
/[A-F[:digit:]a-f]/
# *Not* a POSIX bracket expression; just a regular character class.
/[:digit:]/
/[:digit:]/
# Simple constant interpolation
A = "a"
/#{A}bc/