kyleect / locks

A toy language branched from Lox to learn language implementation and tooling. Forked from loxcraft
https://kyleect.github.io/locks/#/docs
MIT License
0 stars 0 forks source link

Prevent variables from being redeclared #78

Open kyleect opened 7 months ago

kyleect commented 7 months ago

Current this is valid syntax

var a = 100;
var a = 200;

print a; // out: 200

It should be

var a = 100;
var a = 200; // out: NameError: a is already defined

print a; // out: 200