File tree Expand file tree Collapse file tree 1 file changed +30
-2
lines changed
ruby/ql/lib/codeql/ruby/dataflow/internal Expand file tree Collapse file tree 1 file changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -79,10 +79,38 @@ SummaryComponent interpretComponentSpecific(AccessPathToken c) {
79
79
string getComponentSpecificCsv ( SummaryComponent sc ) { none ( ) }
80
80
81
81
/** Gets the textual representation of a parameter position in the format used for flow summaries. */
82
- string getParameterPositionCsv ( ParameterPosition pos ) { result = pos .toString ( ) }
82
+ string getParameterPositionCsv ( ParameterPosition pos ) {
83
+ pos .isSelf ( ) and result = "self"
84
+ or
85
+ pos .isBlock ( ) and result = "block"
86
+ or
87
+ exists ( int i |
88
+ pos .isPositional ( i ) and
89
+ result = i .toString ( )
90
+ )
91
+ or
92
+ exists ( string name |
93
+ pos .isKeyword ( name ) and
94
+ result = name + ":"
95
+ )
96
+ }
83
97
84
98
/** Gets the textual representation of an argument position in the format used for flow summaries. */
85
- string getArgumentPositionCsv ( ArgumentPosition pos ) { result = pos .toString ( ) }
99
+ string getArgumentPositionCsv ( ArgumentPosition pos ) {
100
+ pos .isSelf ( ) and result = "self"
101
+ or
102
+ pos .isBlock ( ) and result = "block"
103
+ or
104
+ exists ( int i |
105
+ pos .isPositional ( i ) and
106
+ result = i .toString ( )
107
+ )
108
+ or
109
+ exists ( string name |
110
+ pos .isKeyword ( name ) and
111
+ result = name + ":"
112
+ )
113
+ }
86
114
87
115
/** Holds if input specification component `c` needs a reference. */
88
116
predicate inputNeedsReferenceSpecific ( string c ) { none ( ) }
You can’t perform that action at this time.
0 commit comments