[go: up one dir, main page]

compiler doesn't halt when multiple variables with the same names are present

if two variables are declared with the same name, only the first one will be used because of the linear scanning algorithm employed by the interpreter. the correct behaviour in this case should be to halt the compiler and present the user with a detailed error. to fix this, the compiler should also represent the ast using a balanced tree instead of a vector. this would also significantly speed up variable fetching at runtime.