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

Updates for v0.28.0 #55

Merged
merged 7 commits into from
Jul 29, 2023
Merged

Updates for v0.28.0 #55

merged 7 commits into from
Jul 29, 2023

Commits on Jul 29, 2023

  1. Make "let assert" a statement instead of an expression

    This makes me a little uneasy, as the way that the Gleam parser parses
    "let assert" is that it first parses "let", then calls
    "parse_assignment" which will look to see if an "assert" comes next,
    and uses this information to choose the node type.
    
    I think a closer tree-sitter implementation would look like this:
    
    _statement: ($) => choice($._expression, $._assignment, $.use),
    ...
    _assignment: ($) => choice($.let, $.let_assert),
    let: ($) => seq("let", $._assignment2),
    let_assert: ($) => seq("let", "assert", $._assignment2)
    _assignment2: ($) =>
      ...
    
    However this requires an awkward "_assignment2" and isn't
    substantially closer to the Gleam parser to warrant the change.
    
    Also we could simply do `optional("assert")`, but that would make
    "let" and "let assert" the same node type, which I suspect is an anti-feature.
    J3RN committed Jul 29, 2023
    Configuration menu
    Copy the full SHA
    2f3004c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6f9fb7f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5bbc41a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6168f64 View commit details
    Browse the repository at this point in the history
  5. Add integer negation

    J3RN committed Jul 29, 2023
    Configuration menu
    Copy the full SHA
    bd249a1 View commit details
    Browse the repository at this point in the history
  6. Fix highlight test for unary negation

    Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
    J3RN and the-mikedavis committed Jul 29, 2023
    Configuration menu
    Copy the full SHA
    11d97e1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    03b67f6 View commit details
    Browse the repository at this point in the history