mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-23 05:40:44 +00:00
lz.n: generate less code
This commit is contained in:
parent
09e83a6cec
commit
9dd2a11e4d
1 changed files with 15 additions and 9 deletions
|
@ -40,7 +40,12 @@
|
||||||
end
|
end
|
||||||
''
|
''
|
||||||
else null;
|
else null;
|
||||||
after = mkLuaInline ''
|
|
||||||
|
after =
|
||||||
|
if spec.setupModule == null && spec.after == null
|
||||||
|
then null
|
||||||
|
else
|
||||||
|
mkLuaInline ''
|
||||||
function()
|
function()
|
||||||
${
|
${
|
||||||
optionalString (spec.setupModule != null)
|
optionalString (spec.setupModule != null)
|
||||||
|
@ -49,6 +54,7 @@
|
||||||
${optionalString (spec.after != null) spec.after}
|
${optionalString (spec.after != null) spec.after}
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
|
||||||
keys =
|
keys =
|
||||||
if typeOf spec.keys == "list" && length spec.keys > 0 && typeOf (head spec.keys) == "set"
|
if typeOf spec.keys == "list" && length spec.keys > 0 && typeOf (head spec.keys) == "set"
|
||||||
then map toLuzLznKeySpec spec.keys
|
then map toLuzLznKeySpec spec.keys
|
||||||
|
|
Loading…
Reference in a new issue