Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: format function signature #3495

Merged
merged 12 commits into from Nov 16, 2023
Merged

chore: format function signature #3495

merged 12 commits into from Nov 16, 2023

Conversation

ghost
Copy link

@ghost ghost commented Nov 15, 2023

Description

  • Introduced a new Param struct with fields for visibility, pattern, type, and span.
  • Updated FunctionDefinition to use a vector of Param instead of a tuple for its parameters.
  • Modified various functions and methods across different modules (expression.rs, function.rs, statement.rs, resolver.rs, expr.rs, type_check/mod.rs, and others) to accommodate the new Param structure.
  • Adjusted parsing logic in parser.rs to construct Param objects instead of tuples.
  • Made necessary changes in formatting and error handling to align with the new parameter representation.

Problem

Documentation

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [Exceptional Case] Documentation to be submitted in a separate PR.

PR Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@ghost
Copy link
Author

ghost commented Nov 15, 2023

ah...

compiler/noirc_frontend/src/ast/expression.rs Outdated Show resolved Hide resolved
tooling/nargo_cli/src/cli/fmt_cmd.rs Outdated Show resolved Hide resolved
tooling/nargo_fmt/src/visitor/item.rs Outdated Show resolved Hide resolved
tooling/nargo_fmt/tests/expected/fn.nr Outdated Show resolved Hide resolved
@ghost ghost requested a review from jfecher November 16, 2023 18:32
@jfecher jfecher added this pull request to the merge queue Nov 16, 2023
Merged via the queue into noir-lang:master with commit 52dbcf1 Nov 16, 2023
33 checks passed
TomAFrench added a commit that referenced this pull request Nov 17, 2023
* master:
  chore: update `async-lsp` to v0.1.0 (#3489)
  fix: adding proving key initialization (#3322)
  chore(fmt): don't lose line breaks between comments (#3505)
  feat: Add LSP command to profile opcodes in vscode (#3496)
  chore: format integration tests (#3399)
  chore: Refactor parser tests (with concat!()) (#3500)
  chore: format function signature (#3495)
  chore: update `self_cell` to v1.0.2 (#3487)
  chore: Fix broken link (#3497)
  chore: update array formatting style (#3486)
  chore(fmt): add fn_call_width (#3480)
  chore: Fix undesirable line break before '{' in function signature with comments (#3473)
  fix: apply predicate to over/underflow checks (#3494)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant