X := "somevalue" works in the main func, but not outside

What calmh said. This makes the parser simpler, you don’t need a symbol table if you require that each declaration at the top level being with one of the seven declaration keywords.