renamed "isGenerator" to "is_generator"

This commit is contained in:
Erik Krogh Kristensen
2020-09-04 11:52:14 +02:00
parent a57f93b41e
commit b3f7c26669
14 changed files with 23 additions and 16 deletions

View File

@@ -15,6 +15,6 @@ import javascript
from YieldExpr yield, Function f
where
f = yield.getEnclosingFunction() and
not isGenerator(f)
not is_generator(f)
select yield, "This yield expression is contained in $@ which is not marked as a generator.",
f.getFirstToken(), f.describe()

View File

@@ -280,3 +280,8 @@ deprecated predicate unicodePropertyEscapeName(RegExpUnicodePropertyEscape id, s
* Use `RegExpUnicodePropertyEscape#getValue()` instead.
*/
deprecated predicate unicodePropertyEscapeValue(RegExpUnicodePropertyEscape id, string value) { unicode_property_escapevalue(id, value) }
/**
* Alias for the predicate `is_generator` defined in the .dbscheme.
* Use `Function#isGenerator()` instead.
*/
deprecated predicate isGenerator(Function fun) { is_generator(fun) }

View File

@@ -164,7 +164,7 @@ class Function extends @function, Parameterized, TypeParameterized, StmtContaine
/** Holds if this function is a generator function. */
predicate isGenerator() {
isGenerator(this)
is_generator(this)
or
// we also support `yield` in non-generator functions
exists(YieldExpr yield | this = yield.getEnclosingFunction())

View File

@@ -439,7 +439,7 @@ scopenesting (unique int inner: @scope ref,
@parameterized = @function | @catchclause;
@type_parameterized = @function | @classorinterface | @typealiasdeclaration | @mappedtypeexpr | @infertypeexpr;
isGenerator (int fun: @function ref);
is_generator (int fun: @function ref);
hasRestParameter (int fun: @function ref);
isAsync (int fun: @function ref);

View File

@@ -11687,7 +11687,7 @@
</dependencies>
</relation>
<relation>
<name>isGenerator</name>
<name>is_generator</name>
<cardinality>62</cardinality>
<columnsizes>
<e>