diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-04-18 15:28:46 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-04-18 15:28:59 -0700 |
| commit | 16f3a189fd9b32f599d1271c772e6d4287f95d20 (patch) | |
| tree | d40c600e0ea0c1de66a170057027b37219d0219c /core | |
| parent | b589c23741c3111c151c0fecc7e299fd321c13a1 (diff) | |
More working, shifting towards having Lua and Nomsu objects instead of
just strings.
Diffstat (limited to 'core')
| -rw-r--r-- | core/metaprogramming.nom | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/metaprogramming.nom b/core/metaprogramming.nom index 1b65890..011d44d 100644 --- a/core/metaprogramming.nom +++ b/core/metaprogramming.nom @@ -78,13 +78,13 @@ immediately: for i, line in ipairs(\%longhand.value) do lines[i] = line.source:get_text(); end template = repr(table.concat(lines, "\\n")); else - template = repr(\%longhand.source:get_text()); + template = repr(tostring(\%longhand.source:get_text())); end local replacements = {}; for i, a in ipairs(args) do replacements[i] = a.."="..a; end replacements = "{"..table.concat(replacements, ", ").."}"; lua:append([[) - local template = nomsu:parse(]]..template..[[, ]]..repr(tree.source.filename)..[[); + local template = nomsu:parse(Nomsu(]]..repr(tree.source)..[[, ]]..template..[[)); local replacement = nomsu:tree_with_replaced_vars(template, ]]..replacements..[[); return replacement:as_lua(nomsu); end); |
