sannybuilder/dev

typed variable declaration allows malformed syntax

Closed this issue · 1 comments

x87 commented

#32

int int int
int = x
int = float
int 0 <------------- this is sick. the compiler will replace any 0 in code with the variable
int x > 5

should error under the following rules:

  • variable name can not match reserved words
  • the type must be followed by a valid identifier (numbers or math symbols are not allowed)
  • only = is allowed in initialization part
x87 commented

same problem with const declaration

const 0 = 1
wait 0 // guess the number?