Skip to content

Commit

Permalink
cc: format documents
Browse files Browse the repository at this point in the history
  • Loading branch information
atirut-w committed Aug 14, 2024
1 parent 0f5b771 commit 5cac816
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
5 changes: 3 additions & 2 deletions src/cc/analyzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ any Analyzer::visitFunctionDefinition(CParser::FunctionDefinitionContext *ctx)
{
for (auto *item_ctx : itemlist_ctx->blockItem())
{
// We check for return statements here because we only want to check if this function *ends* with a return statement
// We check for return statements here because we only want to check if this function *ends* with a return
// statement
if (auto *statement_ctx = item_ctx->statement())
{
if (auto *jump_statement_ctx = statement_ctx->jumpStatement())
Expand All @@ -39,7 +40,7 @@ any Analyzer::visitFunctionDefinition(CParser::FunctionDefinitionContext *ctx)
}
}
}

visit(item_ctx);
}
}
Expand Down
7 changes: 2 additions & 5 deletions src/cc/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,9 @@ unique_ptr<const ArgumentParser> parse_args(int argc, char *argv[])
.help("Keep intermediate files")
.default_value(false)
.implicit_value(true);

// Dump AST
parser->add_argument("--dump-ast")
.help("Dump AST to stdout")
.default_value(false)
.implicit_value(true);
parser->add_argument("--dump-ast").help("Dump AST to stdout").default_value(false).implicit_value(true);

try
{
Expand Down

0 comments on commit 5cac816

Please sign in to comment.