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.
Nom currently has syntax to support declaring some variables as
val
(constant) and some asvar
(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.