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

Skip to content

Commit 3ed310f

Browse files
committed
renamed "unicodePropertyEscapeName" to "unicode_property_escapename"
1 parent acc13dd commit 3ed310f

7 files changed

Lines changed: 13 additions & 6 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
@@ -286,7 +286,7 @@ public void visit(CharacterClassEscape nd) {
286286
@Override
287287
public void visit(UnicodePropertyEscape nd) {
288288
Label lbl = extractTerm(nd, parent, idx);
289-
trapwriter.addTuple("unicodePropertyEscapeName", lbl, nd.getName());
289+
trapwriter.addTuple("unicode_property_escapename", lbl, nd.getName());
290290
if (nd.hasValue()) trapwriter.addTuple("unicodePropertyEscapeValue", lbl, nd.getValue());
291291
}
292292

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ regexpterm(#20075,27,#20074,0,"\p{Number}")
232232
#20076=@"loc,{#10000},4,2,4,11"
233233
locations_default(#20076,#10000,4,2,4,11)
234234
hasLocation(#20075,#20076)
235-
unicodePropertyEscapeName(#20075,"Number")
235+
unicode_property_escapename(#20075,"Number")
236236
#20077=*
237237
stmts(#20077,2,#20001,4,"/\P{Script=Greek}/u;")
238238
hasLocation(#20077,#20011)
@@ -248,7 +248,7 @@ regexpterm(#20079,27,#20078,0,"\P{Script=Greek}")
248248
#20080=@"loc,{#10000},5,2,5,17"
249249
locations_default(#20080,#10000,5,2,5,17)
250250
hasLocation(#20079,#20080)
251-
unicodePropertyEscapeName(#20079,"Script")
251+
unicode_property_escapename(#20079,"Script")
252252
unicodePropertyEscapeValue(#20079,"Greek")
253253
#20081=*
254254
stmts(#20081,2,#20001,5,"/\k</;")

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,3 +270,8 @@ deprecated predicate charClassEscape(RegExpCharacterClassEscape id, string value
270270
* Use `RegExpBackRef#getName()` instead.
271271
*/
272272
deprecated predicate namedBackref(RegExpBackRef id, string name) { named_backref(id, name) }
273+
/**
274+
* Alias for the predicate `unicode_property_escapename` defined in the .dbscheme.
275+
* Use `RegExpUnicodePropertyEscape#getName()` instead.
276+
*/
277+
deprecated predicate unicodePropertyEscapeName(RegExpUnicodePropertyEscape id, string name) { unicode_property_escapename(id, name) }

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ class RegExpUnicodePropertyEscape extends RegExpEscape, @regexp_unicode_property
699699
* Gets the name of this Unicode property; for example, `Number` for `\p{Number}` and
700700
* `Script` for `\p{Script=Greek}`.
701701
*/
702-
string getName() { unicodePropertyEscapeName(this, result) }
702+
string getName() { unicode_property_escapename(this, result) }
703703

704704
/**
705705
* Gets the value of this Unicode property, if any.

javascript/ql/src/semmlecode.javascript.dbscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ regexp_const_value (unique int id: @regexp_constant ref, varchar(1) value: strin
887887
char_class_escape (unique int id: @regexp_char_class_escape ref, varchar(1) value: string ref);
888888
backref (unique int id: @regexp_backref ref, int value: int ref);
889889
named_backref (unique int id: @regexp_backref ref, string name: string ref);
890-
unicodePropertyEscapeName (unique int id: @regexp_unicode_property_escape ref, string name: string ref);
890+
unicode_property_escapename (unique int id: @regexp_unicode_property_escape ref, string name: string ref);
891891
unicodePropertyEscapeValue (unique int id: @regexp_unicode_property_escape ref, string value: string ref);
892892

893893
// tokens

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20618,7 +20618,7 @@
2061820618
</dependencies>
2061920619
</relation>
2062020620
<relation>
20621-
<name>unicodePropertyEscapeName</name>
20621+
<name>unicode_property_escapename</name>
2062220622
<cardinality>1573</cardinality>
2062320623
<columnsizes>
2062420624
<e>

javascript/upgrades/c73fbfca57f3d593b9ff50c6aa3a886d6888efec/upgrade.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,5 @@ char_class_escape.rel: reorder charClassEscape.rel(int id, string value) id valu
8282
charClassEscape.rel: delete
8383
named_backref.rel: reorder namedBackref.rel(int id, string name) id name
8484
namedBackref.rel: delete
85+
unicode_property_escapename.rel: reorder unicodePropertyEscapeName.rel(int id, string name) id name
86+
unicodePropertyEscapeName.rel: delete

0 commit comments

Comments
 (0)