ethereum / fe

Emerging smart contract language for the Ethereum blockchain.
https://fe-lang.org
Other
1.6k stars 178 forks source link

parser: Allow `mut` occurrence only in path pattern #990

Closed Y-Nak closed 6 months ago

Y-Nak commented 6 months ago

This PR restricts

  1. the mut keyword occurrence in a pattern only before Path,
  2. Add a field to Hir::Pat::Path to indicate the mutability of the path.

The main reason for the change was that I hesitated to make all HIR pattern kinds include mutability flags.