Skip to content

Commit 130631a

Browse files
committed
feat(ast): Update and fix statements
1 parent ead07fa commit 130631a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

ql/lib/codeql/bicep/ast/Stmts.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class Infrastructure extends AstNode instanceof InfrastructureImpl {
7575
* Represents a parameter declaration node in the AST.
7676
* Provides access to the identifier, name, type, and default value of the parameter.
7777
*/
78-
class ParameterDeclaration extends AstNode instanceof ParameterDeclarationImpl {
78+
class ParameterDeclaration extends Stmts instanceof ParameterDeclarationImpl {
7979
/** Gets the identifier of the parameter declaration. */
8080
Identifier getIdentifier() { result = ParameterDeclarationImpl.super.getName() }
8181

@@ -94,7 +94,7 @@ class ParameterDeclaration extends AstNode instanceof ParameterDeclarationImpl {
9494
* Represents an output declaration node in the AST.
9595
* Provides access to the identifier, name, type, and value of the output.
9696
*/
97-
class OutputDeclaration extends AstNode instanceof OutputDeclarationImpl {
97+
class OutputDeclaration extends Stmts instanceof OutputDeclarationImpl {
9898
/** Gets the identifier of the output declaration. */
9999
Identifier getIdentifier() { result = OutputDeclarationImpl.super.getIdentifier() }
100100

@@ -112,7 +112,7 @@ class OutputDeclaration extends AstNode instanceof OutputDeclarationImpl {
112112
* Represents a user-defined function node in the AST.
113113
* Provides access to the identifier, name, return type, parameters, and body of the function.
114114
*/
115-
class UserDefinedFunction extends AstNode instanceof UserDefinedFunctionImpl {
115+
class UserDefinedFunction extends Stmts instanceof UserDefinedFunctionImpl {
116116
/** Gets the identifier of the user-defined function. */
117117
Identifier getIdentifier() { result = UserDefinedFunctionImpl.super.getName() }
118118

ql/lib/codeql/bicep/ast/internal/AstNodes.qll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ class TIdents = TIdentifier or TPropertyIdentifier;
8888
*/
8989
class TStmts =
9090
TInfrastructure or TAssertStatement or TForStatement or TIfStatement or TImportStatement or
91-
TImportWithStatement or TStatement or TUsingStatement or TVariableDeclaration;
91+
TImportWithStatement or TStatement or TUsingStatement or TVariableDeclaration or
92+
TParameterDeclaration or TOutputDeclaration or TUserDefinedFunction;
9293

9394
/**
9495
* A expersion value in a Bicep program

0 commit comments

Comments
 (0)