renamed "regexpParseErrors" to "regexp_parse_errors"

This commit is contained in:
Erik Krogh Kristensen
2020-09-04 11:52:05 +02:00
parent fdb615fb91
commit 37432232b8
10 changed files with 25 additions and 18 deletions

View File

@@ -363,7 +363,7 @@ public class RegExpExtractor {
for (Error err : res.getErrors()) {
Label lbl = this.trapwriter.freshLabel();
String msg = errmsgs[err.getCode()];
this.trapwriter.addTuple("regexpParseErrors", lbl, rootLbl, msg);
this.trapwriter.addTuple("regexp_parse_errors", lbl, rootLbl, msg);
this.emitLocation(err, lbl);
}
}

View File

@@ -1319,7 +1319,7 @@ locations_default(#20436,#10000,26,2,26,4)
hasLocation(#20435,#20436)
backref(#20435,10)
#20437=*
regexpParseErrors(#20437,#20435,"invalid back reference")
regexp_parse_errors(#20437,#20435,"invalid back reference")
hasLocation(#20437,#20436)
#20438=*
stmts(#20438,2,#20001,26,"/\t\n\r\f\v/;")
@@ -1680,12 +1680,12 @@ locations_default(#20545,#10000,37,2,37,2)
locations_default(#20545,#10000,37,2,37,2)
hasLocation(#20544,#20545)
regexpConstValue(#20544,"a")
#20546=*
#20546=*
regexp_parse_errors(#20546,#20542,"expected digit")
#20547=@"loc,{#10000},37,4,37,4"
locations_default(#20547,#10000,37,4,37,4)
hasLocation(#20546,#20547)
#20548=*
#20548=*
regexp_parse_errors(#20548,#20542,"expected '}'")
#20549=@"loc,{#10000},37,3,37,3"
locations_default(#20549,#10000,37,3,37,3)
@@ -1731,15 +1731,15 @@ locations_default(#20561,#10000,38,5,38,5)
locations_default(#20561,#10000,38,5,38,5)
hasLocation(#20560,#20561)
regexpConstValue(#20560,"}")
#20562=*
#20562=*
regexp_parse_errors(#20562,#20552,"expected digit")
hasLocation(#20562,#20559)
#20563=*
#20563=*
regexp_parse_errors(#20563,#20552,"expected '}'")
#20564=@"loc,{#10000},38,3,38,3"
locations_default(#20564,#10000,38,3,38,3)
hasLocation(#20563,#20564)
#20565=*
#20565=*
regexp_parse_errors(#20565,#20552,"unexpected character")
hasLocation(#20565,#20561)
#20566=*
@@ -1766,7 +1766,7 @@ locations_default(#20571,#10000,39,2,39,2)
locations_default(#20571,#10000,39,2,39,2)
hasLocation(#20570,#20571)
regexpConstValue(#20570,"a")
#20572=*
#20572=*
regexp_parse_errors(#20572,#20568,"expected '}'")
#20573=@"loc,{#10000},39,4,39,4"
locations_default(#20573,#10000,39,4,39,4)
@@ -1788,7 +1788,7 @@ hasLocation(#20576,#20577)
hasLocation(#20576,#20577)
regexpConstValue(#20576,"
")
#20578=*
#20578=*
regexp_parse_errors(#20578,#20576,"unexpected end of regular expression")
#20579=@"loc,{#10000},40,5,40,5"
locations_default(#20579,#10000,40,5,40,5)
@@ -1809,7 +1809,7 @@ locations_default(#20583,#10000,41,2,41,4)
locations_default(#20583,#10000,41,2,41,4)
hasLocation(#20582,#20583)
regexpConstValue(#20582,"")
#20584=*
#20584=*
regexp_parse_errors(#20584,#20582,"expected control letter")
#20585=@"loc,{#10000},41,4,41,4"
locations_default(#20585,#10000,41,4,41,4)

View File

@@ -267,12 +267,12 @@ locations_default(#20084,#10000,6,2,6,4)
hasLocation(#20083,#20084)
namedBackref(#20083,"")
#20085=*
regexpParseErrors(#20085,#20083,"expected identifier")
regexp_parse_errors(#20085,#20083,"expected identifier")
#20086=@"loc,{#10000},6,5,6,5"
locations_default(#20086,#10000,6,5,6,5)
hasLocation(#20085,#20086)
#20087=*
regexpParseErrors(#20087,#20083,"expected '>'")
regexp_parse_errors(#20087,#20083,"expected '>'")
#20088=@"loc,{#10000},6,4,6,4"
locations_default(#20088,#10000,6,4,6,4)
hasLocation(#20087,#20088)

View File

@@ -311,12 +311,12 @@ locations_default(#20101,#10000,5,10,5,11)
hasLocation(#20100,#20101)
regexpConstValue(#20100,"")
#20102=*
regexpParseErrors(#20102,#20096,"expected hexadecimal digit")
regexp_parse_errors(#20102,#20096,"expected hexadecimal digit")
#20103=@"loc,{#10000},5,12,5,12"
locations_default(#20103,#10000,5,12,5,12)
hasLocation(#20102,#20103)
#20104=*
regexpParseErrors(#20104,#20096,"expected hexadecimal digit")
regexp_parse_errors(#20104,#20096,"expected hexadecimal digit")
hasLocation(#20104,#20103)
#20105=*
exprs(#20105,0,#20093,1,"exec")

View File

@@ -220,3 +220,8 @@ deprecated predicate hasAssertsKeyword(PredicateTypeExpr node) { has_asserts_key
* Use the `JSParseError` class instead.
*/
deprecated predicate jsParseErrors(JSParseError id, TopLevel toplevel, string message, string line) { js_parse_errors(id, toplevel, message, line) }
/**
* Alias for the predicate `regexp_parse_errors` defined in the .dbscheme.
* Use the `RegExpParseError` class instead.
*/
deprecated predicate regexpParseErrors(RegExpParseError id, RegExpTerm regexp, string message) { regexp_parse_errors(id, regexp, message) }

View File

@@ -819,12 +819,12 @@ class RegExpCharacterRange extends RegExpTerm, @regexp_char_range {
/** A parse error encountered while processing a regular expression literal. */
class RegExpParseError extends Error, @regexp_parse_error {
/** Gets the regular expression term that triggered the parse error. */
RegExpTerm getTerm() { regexpParseErrors(this, result, _) }
RegExpTerm getTerm() { regexp_parse_errors(this, result, _) }
/** Gets the regular expression literal in which the parse error occurred. */
RegExpLiteral getLiteral() { result = getTerm().getLiteral() }
override string getMessage() { regexpParseErrors(this, _, result) }
override string getMessage() { regexp_parse_errors(this, _, result) }
override string toString() { result = getMessage() }
}

View File

@@ -864,7 +864,7 @@ case @regexpterm.kind of
| 26 = @regexp_negative_lookbehind
| 27 = @regexp_unicode_property_escape;
regexpParseErrors (unique int id: @regexp_parse_error,
regexp_parse_errors (unique int id: @regexp_parse_error,
int regexp: @regexpterm ref,
varchar(900) message: string ref);

View File

@@ -19869,7 +19869,7 @@
</dependencies>
</relation>
<relation>
<name>regexpParseErrors</name>
<name>regexp_parse_errors</name>
<key>id</key>
<cardinality>122</cardinality>
<columnsizes>

View File

@@ -62,3 +62,5 @@ has_asserts_keyword.rel: reorder hasAssertsKeyword.rel(int node) node
hasAssertsKeyword.rel: delete
js_parse_errors.rel: reorder jsParseErrors.rel(int id, int toplevel, string message, string line) id toplevel message line
jsParseErrors.rel: delete
regexp_parse_errors.rel: reorder regexpParseErrors.rel(int id, int regexp, string message) id regexp message
regexpParseErrors.rel: delete