@@ -42,10 +42,11 @@ local units = {}
4242
4343local function register (name , default , checker , loader , caller )
4444 units [name ] = {
45- default = default ,
45+ name = name ,
46+ default = default ,
4647 _checker = checker ,
47- loader = loader ,
48- caller = caller ,
48+ loader = loader ,
49+ caller = caller ,
4950 }
5051end
5152
@@ -194,18 +195,25 @@ local template = {
194195 ),
195196 [' Lua.runtime.meta' ] = Type .String >> ' ${version} ${language} ${encoding}' ,
196197 [' Lua.runtime.unicodeName' ] = Type .Boolean ,
197- [' Lua.runtime.nonstandardSymbol' ] = Type .Hash (Type .String , Type . Boolean , ' ; ' ),
198+ [' Lua.runtime.nonstandardSymbol' ] = Type .Array (Type .String ),
198199 [' Lua.runtime.plugin' ] = Type .String ,
199200 [' Lua.runtime.fileEncoding' ] = Type .String >> ' utf8' << {
200201 ' utf8' ,
201202 ' ansi' ,
202203 ' utf16le' ,
203204 ' utf16be' ,
204205 },
205- [' Lua.runtime.builtin' ] = Type .Hash (Type .String , Type .String ),
206+ [' Lua.runtime.builtin' ] = Type .Hash (
207+ Type .String << util .getTableKeys (define .BuiltIn , true ),
208+ Type .String >> ' default' << {
209+ ' default' ,
210+ ' enable' ,
211+ ' disable' ,
212+ }
213+ ),
206214 [' Lua.diagnostics.enable' ] = Type .Boolean >> true ,
207- [' Lua.diagnostics.globals' ] = Type .Hash (Type .String , Type . Boolean , ' ; ' ),
208- [' Lua.diagnostics.disable' ] = Type .Hash (Type .String , Type . Boolean , ' ; ' ),
215+ [' Lua.diagnostics.globals' ] = Type .Array (Type .String ),
216+ [' Lua.diagnostics.disable' ] = Type .Array (Type .String ),
209217 [' Lua.diagnostics.severity' ] = Type .Hash (Type .String , Type .String )
210218 >> util .deepCopy (define .DiagnosticDefaultSeverity ),
211219 [' Lua.diagnostics.neededFileStatus' ] = Type .Hash (Type .String , Type .String )
0 commit comments