Skip to content

Commit

Permalink
improve ast dumping for interfaces
Browse files Browse the repository at this point in the history
Signed-off-by: Jade Abraham <[email protected]>
  • Loading branch information
jabraham17 committed Sep 9, 2024
1 parent 1ce054d commit 5578c06
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions compiler/AST/AstDump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,17 @@ void AstDump::exitCatchStmt(CatchStmt* node) {
write("}");
}

//
// ImplementsStmt
//
bool AstDump::enterImplementsStmt(ImplementsStmt* node) {
newline();
write("ifc");
if (fLogIds)
fprintf(mFP, "[%d]", node->id);
return true;
}

//
// Helper functions
//
Expand Down
2 changes: 2 additions & 0 deletions compiler/include/AstDump.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ class AstDump final : public AstLogger {
bool enterCatchStmt (CatchStmt* node) override;
void exitCatchStmt (CatchStmt* node) override;

bool enterImplementsStmt(ImplementsStmt* node) override;

private:
AstDump();

Expand Down

0 comments on commit 5578c06

Please sign in to comment.