Tweaks.
This commit is contained in:
parent
340714635a
commit
3c303018bb
@ -72,6 +72,10 @@ rule [%tree as value] =:
|
||||
=lua "nomsu:tree_to_value(\(%tree), vars)"
|
||||
compile [repr %obj] to:
|
||||
"nomsu:repr(\(%obj as lua))"
|
||||
compile [indented %obj] to:
|
||||
"nomsu:indent(\(%obj as lua))"
|
||||
compile [dedented %obj] to:
|
||||
"nomsu:dedent(\(%obj as lua))"
|
||||
compile [type %obj, type of %obj] to:
|
||||
"type(\(%obj as lua))"
|
||||
|
||||
|
@ -353,8 +353,9 @@ do
|
||||
scope = nil
|
||||
end
|
||||
if after == nil then
|
||||
after = 0
|
||||
after = nil
|
||||
end
|
||||
after = after or (self.core_defs or 0)
|
||||
scope = scope or self.defs
|
||||
local defs_by_num = { }
|
||||
for stub, def in pairs(scope) do
|
||||
|
@ -277,7 +277,8 @@ class NomsuCompiler
|
||||
if not ok then @error(ret1)
|
||||
return ret1, ret2
|
||||
|
||||
serialize_defs: (scope=nil, after=0)=>
|
||||
serialize_defs: (scope=nil, after=nil)=>
|
||||
after or= @core_defs or 0
|
||||
scope or= @defs
|
||||
defs_by_num = {}
|
||||
for stub, def in pairs(scope)
|
||||
|
Loading…
Reference in New Issue
Block a user