mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
renamed "isGenerator" to "is_generator"
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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) }
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -11687,7 +11687,7 @@
|
||||
</dependencies>
|
||||
</relation>
|
||||
<relation>
|
||||
<name>isGenerator</name>
|
||||
<name>is_generator</name>
|
||||
<cardinality>62</cardinality>
|
||||
<columnsizes>
|
||||
<e>
|
||||
|
||||
Reference in New Issue
Block a user