Skip to content

Commit

Permalink
In the parser, properly capture the start position of (possibly publi…
Browse files Browse the repository at this point in the history
…c) declarations, instead of after the `pub` keyword.

This applies to `proc`, `fn`, `struct`, `impl`, `const`, `type`.

PiperOrigin-RevId: 694184864
  • Loading branch information
dplassgit authored and copybara-github committed Nov 7, 2024
1 parent 4056490 commit a5ec3a1
Show file tree
Hide file tree
Showing 5 changed files with 166 additions and 94 deletions.
2 changes: 1 addition & 1 deletion xls/dslx/fmt/ast_fmt_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class FunctionFmtTest : public testing::Test {
}

XLS_ASSIGN_OR_RETURN(
f_, parser_->ParseFunction(/*is_public=*/false, bindings_));
f_, parser_->ParseFunction(Pos(), /*is_public=*/false, bindings_));
Comments comments = Comments::Create(scanner_->comments());

DocRef doc = Fmt(*f_, comments, arena_);
Expand Down
Loading

0 comments on commit a5ec3a1

Please sign in to comment.