PlutoLang / Pluto

A superset of Lua 5.4 with a focus on general-purpose programming.
https://pluto-lang.org/docs/Introduction
MIT License
338 stars 20 forks source link

Autodetect if keywords should be enabled if not explicitly declared #814

Closed Sainan closed 2 months ago

Sainan commented 2 months ago

Also specialized error message for this case:

local enum = {}

enum begin end
pluto: syntax error: basic.pluto:3: syntax error near 'begin'
    3 | enum begin end
      | ^^^^^^^^^^^^^^ here: 'enum' was not recognized as a statement because it was previously used as an identifier