boltlang / Bolt

A programming language for rapid application development
35 stars 1 forks source link

Add support for variable (re)assignment #44

Open samvv opened 1 year ago

samvv commented 1 year ago

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