JacquelineCasey / Nom

0 stars 0 forks source link

Const Analysis #6

Open JacquelineCasey opened 1 year ago

JacquelineCasey commented 1 year ago

Nom currently has syntax to support declaring some variables as val (constant) and some as var (mutable). However, currently, this does nothing, and all variables are treated as mutable.

Update the scope checking system to also determine which variables are mutated, and emit an error if const correctness is not respected. An error should be emitted if const correctness is violated.

Until further notice, function parameters should be treated as const.