AZHenley / knox

A toy programming language written in Go that compiles to C.
MIT License
96 stars 7 forks source link

Add builtin types to global symbol table #175

Open AZHenley opened 4 years ago

AZHenley commented 4 years ago

And or check identifiers if they are a reserved keyword (from token.go) or the symbol table.

This should not be allowed:

class int { }

AZHenley commented 4 years ago

Possibly remove keywords from the lexer and treat all identifiers the same. That way they do not need to be maintained in multiple places.