fix(parser): let as have a lower precedence#8956
Conversation
Co-authored-by: Akosh Farkash <aakoshh@gmail.com> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Compilation Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: df747a7 | Previous: c0d47a5 | Ratio |
|---|---|---|---|
rollup-block-root-empty |
23.2 s |
18.66 s |
1.24 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
Once we add types directly on integer literals this will be less of an issue at least |
jfecher
left a comment
There was a problem hiding this comment.
Let's just simplify the parser names.
They don't need to contain every rule. Usually a parser rule X includes X and any base cases. E.g. term includes not just multiplication terms but also atoms in other langs but they don't name it term_or_atom, etc.
|
This is ready for review again. |
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE fix(defunctionalize): Create a placeholder function for first-class function calls with no variants (noir-lang/noir#8697) fix(mem2reg): Keep store when any aliased reference is kept (noir-lang/noir#8960) fix(parser): let `as` have a lower precedence (noir-lang/noir#8956) fix: Match against all Value recursive types when checking for a function/closure in a global (noir-lang/noir#8967) fix(formatter): reset indetnation after group changed it (noir-lang/noir#8966) chore(validation): Ban function pointers in SSA globals (noir-lang/noir#8947) chore: address various clippy issues (noir-lang/noir#8942) chore(fuzz): Consider `RangeCheckFailed` equivalent to `ConstantDoesNotFitType` if the value matches (noir-lang/noir#8958) chore(fuzz): Use `nextest` to run nightly fuzz test (noir-lang/noir#8962) chore: minor code quality issues (noir-lang/noir#8961) END_COMMIT_OVERRIDE --------- Co-authored-by: AztecBot <tech@aztecprotocol.com> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE fix(defunctionalize): Create a placeholder function for first-class function calls with no variants (noir-lang/noir#8697) fix(mem2reg): Keep store when any aliased reference is kept (noir-lang/noir#8960) fix(parser): let `as` have a lower precedence (noir-lang/noir#8956) fix: Match against all Value recursive types when checking for a function/closure in a global (noir-lang/noir#8967) fix(formatter): reset indetnation after group changed it (noir-lang/noir#8966) chore(validation): Ban function pointers in SSA globals (noir-lang/noir#8947) chore: address various clippy issues (noir-lang/noir#8942) chore(fuzz): Consider `RangeCheckFailed` equivalent to `ConstantDoesNotFitType` if the value matches (noir-lang/noir#8958) chore(fuzz): Use `nextest` to run nightly fuzz test (noir-lang/noir#8962) chore: minor code quality issues (noir-lang/noir#8961) END_COMMIT_OVERRIDE --------- Co-authored-by: AztecBot <tech@aztecprotocol.com> Co-authored-by: Tom French <15848336+TomAFrench@users.noreply.github.com>
Description
Problem
Related to #8870
Summary
-128 as i8was being parsed as-(128 as i8)which might be a bit unintuitive, and it's also different from Rust. This PR changes that so it's parsed as(-128) as i8.That makes things a bit less intuitive in some cases because
-128 as i16is actually-127, but that's what you get if you also dolet x: Field = -128; x as i16...Additional Context
Documentation
Check one:
PR Checklist
cargo fmton default settings.