Closed devmaars closed 4 months ago
You can do it just like Lua table declarations.
local record MemoryRegion
state: integer
start: integer
["end"]: integer
type: integer
name: string
internalName: string
end
Like in Lua tables, only Lua keywords need this kind of "escaping". Keywords added by Teal (e.g. record
, global
, etc.) are "soft keywords", so they do not require escaping.
Thanks, seem working but it make the vscode go crazy
Thanks for the feedback!
@devmaars does it report an error message?
@pdesaulniers any idea on the vscode-teal issue above?
No there is no error, just the color that become all green. I have also tried disabling all my extensions to ensure that it is vs code teal, causing the color issue
@devmaars The syntax highlighting issue should be fixed in vscode-teal v0.10.0. Bracket notation was not supported inside record declarations.
Hi, i was asking myself, if my record i want to use a keyword that teal grammar already use, how can i escape ? in lua for example we can use string encapsulation
So here come record data type
So my question is how can i use a reserved keyword in a record ? is there a way to escape string ?