mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
AST: add SingletonMethod::getObject
This commit is contained in:
@@ -46,6 +46,9 @@ class SingletonMethod extends Callable, BodyStatement, @singleton_method {
|
||||
|
||||
final override string getAPrimaryQlClass() { result = "SingletonMethod" }
|
||||
|
||||
/** Gets the object of this singleton method. */
|
||||
final Expr getObject() { result = range.getObject() }
|
||||
|
||||
/** Gets the name of this method. */
|
||||
final string getName() { result = range.getName() }
|
||||
}
|
||||
|
||||
@@ -41,6 +41,8 @@ module SingletonMethod {
|
||||
result = generated.getName().(Generated::Setter).getName().getValue() + "="
|
||||
}
|
||||
|
||||
final Generated::AstNode getObject() { result = generated.getObject() }
|
||||
|
||||
final override Generated::AstNode getChild(int i) { result = generated.getChild(i) }
|
||||
|
||||
final override string toString() { result = this.getName() }
|
||||
|
||||
Reference in New Issue
Block a user