Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 35b5b66

Browse files
committed
renamed "rangeQuantifierUpperBound" to "range_quantifier_upper_bound"
1 parent defbee2 commit 35b5b66

7 files changed

Lines changed: 18 additions & 11 deletions

File tree

javascript/extractor/src/com/semmle/js/extractor/RegExpExtractor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ public void visit(Range nd) {
247247

248248
if (nd.hasUpperBound()) {
249249
long hi = nd.getUpperBound();
250-
if (inRange(hi)) trapwriter.addTuple("rangeQuantifierUpperBound", lbl, hi);
250+
if (inRange(hi)) trapwriter.addTuple("range_quantifier_upper_bound", lbl, hi);
251251
}
252252

253253
this.visit(nd.getOperand(), lbl, 0);

javascript/extractor/tests/exprs/output/trap/regexp.js.trap

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ locations_default(#20376,#10000,15,2,15,5)
10881088
hasLocation(#20375,#20376)
10891089
is_greedy(#20375)
10901090
range_quantifier_lower_bound(#20375,1)
1091-
rangeQuantifierUpperBound(#20375,1)
1091+
range_quantifier_upper_bound(#20375,1)
10921092
#20377=*
10931093
regexpterm(#20377,14,#20375,0,"a")
10941094
#20378=@"loc,{#10000},15,2,15,2"
@@ -1135,7 +1135,7 @@ locations_default(#20388,#10000,17,2,17,7)
11351135
hasLocation(#20387,#20388)
11361136
is_greedy(#20387)
11371137
range_quantifier_lower_bound(#20387,1)
1138-
rangeQuantifierUpperBound(#20387,2)
1138+
range_quantifier_upper_bound(#20387,2)
11391139
#20389=*
11401140
regexpterm(#20389,14,#20387,0,"a")
11411141
#20390=@"loc,{#10000},17,2,17,2"
@@ -1158,7 +1158,7 @@ regexpterm(#20393,11,#20392,0,"a{1}?")
11581158
locations_default(#20394,#10000,18,2,18,6)
11591159
hasLocation(#20393,#20394)
11601160
range_quantifier_lower_bound(#20393,1)
1161-
rangeQuantifierUpperBound(#20393,1)
1161+
range_quantifier_upper_bound(#20393,1)
11621162
#20395=*
11631163
regexpterm(#20395,14,#20393,0,"a")
11641164
#20396=@"loc,{#10000},18,2,18,2"
@@ -1203,7 +1203,7 @@ regexpterm(#20405,11,#20404,0,"a{1,2}?")
12031203
locations_default(#20406,#10000,20,2,20,8)
12041204
hasLocation(#20405,#20406)
12051205
range_quantifier_lower_bound(#20405,1)
1206-
rangeQuantifierUpperBound(#20405,2)
1206+
range_quantifier_upper_bound(#20405,2)
12071207
#20407=*
12081208
regexpterm(#20407,14,#20405,0,"a")
12091209
#20408=@"loc,{#10000},20,2,20,2"
@@ -1672,7 +1672,7 @@ locations_default(#20543,#10000,37,2,37,3)
16721672
hasLocation(#20542,#20543)
16731673
is_greedy(#20542)
16741674
range_quantifier_lower_bound(#20542,0)
1675-
rangeQuantifierUpperBound(#20542,0)
1675+
range_quantifier_upper_bound(#20542,0)
16761676
#20544=*
16771677
regexpterm(#20544,14,#20542,0,"a")
16781678
#20545=@"loc,{#10000},37,2,37,2"
@@ -1711,7 +1711,7 @@ locations_default(#20555,#10000,38,2,38,3)
17111711
hasLocation(#20554,#20555)
17121712
is_greedy(#20554)
17131713
range_quantifier_lower_bound(#20554,0)
1714-
rangeQuantifierUpperBound(#20554,0)
1714+
range_quantifier_upper_bound(#20554,0)
17151715
#20556=*
17161716
regexpterm(#20556,14,#20554,0,"a")
17171717
#20557=@"loc,{#10000},38,2,38,2"
@@ -1758,7 +1758,7 @@ locations_default(#20569,#10000,39,2,39,4)
17581758
hasLocation(#20568,#20569)
17591759
is_greedy(#20568)
17601760
range_quantifier_lower_bound(#20568,2)
1761-
rangeQuantifierUpperBound(#20568,2)
1761+
range_quantifier_upper_bound(#20568,2)
17621762
#20570=*
17631763
regexpterm(#20570,14,#20568,0,"a")
17641764
#20571=@"loc,{#10000},39,2,39,2"

javascript/ql/src/semmle/javascript/Aliases.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,3 +235,8 @@ deprecated predicate isGreedy(RegExpQuantifier id) { is_greedy(id) }
235235
* Use `RegExpRange#getLowerBound()` instead.
236236
*/
237237
deprecated predicate rangeQuantifierLowerBound(RegExpRange id, int lo) { range_quantifier_lower_bound(id, lo) }
238+
/**
239+
* Alias for the predicate `range_quantifier_upper_bound` defined in the .dbscheme.
240+
* Use `RegExpRange#getUpperBound() instead.
241+
*/
242+
deprecated predicate rangeQuantifierUpperBound(RegExpRange id, int hi) { range_quantifier_upper_bound(id, hi) }

javascript/ql/src/semmle/javascript/Regexp.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ class RegExpRange extends RegExpQuantifier, @regexp_range {
531531
* For a term of the form `r{lo}`, both the lower and the upper bound
532532
* are `lo`.
533533
*/
534-
int getUpperBound() { rangeQuantifierUpperBound(this, result) }
534+
int getUpperBound() { range_quantifier_upper_bound(this, result) }
535535

536536
override predicate isNullable() {
537537
getAChild().isNullable() or

javascript/ql/src/semmlecode.javascript.dbscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,7 @@ regexp_parse_errors (unique int id: @regexp_parse_error,
879879

880880
is_greedy (int id: @regexp_quantifier ref);
881881
range_quantifier_lower_bound (unique int id: @regexp_range ref, int lo: int ref);
882-
rangeQuantifierUpperBound (unique int id: @regexp_range ref, int hi: int ref);
882+
range_quantifier_upper_bound (unique int id: @regexp_range ref, int hi: int ref);
883883
isCapture (unique int id: @regexp_group ref, int number: int ref);
884884
isNamedCapture (unique int id: @regexp_group ref, string name: string ref);
885885
isInverted (int id: @regexp_char_class ref);

javascript/ql/src/semmlecode.javascript.dbscheme.stats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20167,7 +20167,7 @@
2016720167
</dependencies>
2016820168
</relation>
2016920169
<relation>
20170-
<name>rangeQuantifierUpperBound</name>
20170+
<name>range_quantifier_upper_bound</name>
2017120171
<cardinality>45</cardinality>
2017220172
<columnsizes>
2017320173
<e>

javascript/upgrades/c73fbfca57f3d593b9ff50c6aa3a886d6888efec/upgrade.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,5 @@ is_greedy.rel: reorder isGreedy.rel(int id) id
6868
isGreedy.rel: delete
6969
range_quantifier_lower_bound.rel: reorder rangeQuantifierLowerBound.rel(int id, int lo) id lo
7070
rangeQuantifierLowerBound.rel: delete
71+
range_quantifier_upper_bound.rel: reorder rangeQuantifierUpperBound.rel(int id, int hi) id hi
72+
rangeQuantifierUpperBound.rel: delete

0 commit comments

Comments
 (0)