bit-hack/nano-script

Add const variable types

Closed this issue · 1 comments

It would be nice to support constant expressions and propagate them at the AST level.

const x = 1234
var y = x

Const types have now been added. They can be used to initialize array lengths. They are currently only available in the global scope. They could be made local scope too with some extra support.