aviatorscript icon indicating copy to clipboard operation
aviatorscript copied to clipboard

variable attribute syntax

Open killme2008 opened this issue 5 years ago • 0 comments

Just like lua 5.4 variable attribute, for example:

let c <const> = 1;
c = 2; ##report error

c is declared to be const, it can't be assigned a new value.

{
  let file <close> = io.open("test.txt");
}
## exit scope, the file is closed automatically.

killme2008 avatar Jul 16 '20 09:07 killme2008