Bolt icon indicating copy to clipboard operation
Bolt copied to clipboard

Add support for variable (re)assignment

Open samvv opened this issue 2 years ago • 0 comments

We have chosen := to mean assignment in our language.

let mut foo: Int

foo := 1

if toss.
  foo += foo

Implementation Strategy

  1. Create a new AssignStatement node
  2. Adjust the parser and scanner to be able to pick up the new node
  3. Handle AssignStatement in infer() in the type checker

samvv avatar Jun 02 '23 18:06 samvv