Skip to content

Commit 867ffcb

Browse files
committed
feat(ast): Implement toString method for Object class and update ExprImpl
1 parent ebe5210 commit 867ffcb

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ class Object extends Expr instanceof ObjectImpl {
5151
result = property.getValue()
5252
)
5353
}
54+
55+
override string toString() { result = "Object" }
5456
}
5557

5658
/**

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ private import Stmts
88
*/
99
class ExprImpl extends StmtsImpl, TExpr {
1010
override string getAPrimaryQlClass() { result = "Expr" }
11+
12+
override string toString() { none() }
1113
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ObjectImpl extends TObject, AstNode {
1919

2020
ObjectImpl() { this = TObject(ast) }
2121

22-
override string toString() { result = ast.toString() }
22+
// override string toString() { result = ast.toString() }
2323

2424
ObjectPropertyImpl getProperty(int index) { toTreeSitter(result) = ast.getChild(index) }
2525

0 commit comments

Comments
 (0)