mirror of
https://github.com/github/codeql.git
synced 2026-05-25 00:27:09 +02:00
PS: Rename getExpr to getBase on ParenExpr.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import powershell
|
||||
|
||||
class ParenExpr extends @paren_expression, Expr {
|
||||
PipelineBase getExpr() { paren_expression(this, result) }
|
||||
PipelineBase getBase() { paren_expression(this, result) }
|
||||
|
||||
override SourceLocation getLocation() { paren_expression_location(this, result) }
|
||||
|
||||
|
||||
@@ -501,6 +501,20 @@ module ExprNodes {
|
||||
|
||||
TypeConstraint getType() { result = e.getType() }
|
||||
}
|
||||
|
||||
class ParenExprChildMapping extends ExprChildMapping, ParenExpr {
|
||||
override predicate relevantChild(Ast n) { n = this.getBase() }
|
||||
}
|
||||
|
||||
class ParenCfgNode extends ExprCfgNode {
|
||||
override string getAPrimaryQlClass() { result = "ParenExprCfgNode" }
|
||||
|
||||
override ParenExprChildMapping e;
|
||||
|
||||
override ParenExpr getExpr() { result = e }
|
||||
|
||||
final StmtCfgNode getBase() { e.hasCfgChild(e.getBase(), this, result) }
|
||||
}
|
||||
}
|
||||
|
||||
module StmtNodes {
|
||||
|
||||
@@ -601,7 +601,7 @@ module Trees {
|
||||
}
|
||||
|
||||
class ParenExprTree extends StandardPostOrderTree instanceof ParenExpr {
|
||||
override AstNode getChildNode(int i) { i = 0 and result = super.getExpr() }
|
||||
override AstNode getChildNode(int i) { i = 0 and result = super.getBase() }
|
||||
}
|
||||
|
||||
class TypeNameExprTree extends LeafTree instanceof TypeNameExpr { }
|
||||
|
||||
Reference in New Issue
Block a user