From d42d20c50ae0443e2ac5ffa6492ad57745e27830 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 9 Apr 2018 18:58:05 -0700 Subject: Re-added callstack callsite info. It's a bit hacky, but better than nothing. --- core/text.nom | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/text.nom') diff --git a/core/text.nom b/core/text.nom index 8213988..b3a2b6a 100644 --- a/core/text.nom +++ b/core/text.nom @@ -32,7 +32,7 @@ lua> ".." }; for name, e in pairs(escapes) do local lua = "'"..e.."'"; - nomsu:define_compile_action(name, \(!! code location !!), function() return {expr=lua}; end); + nomsu:define_compile_action(name, \(!! code location !!), function(__callsite) return {expr=lua}; end); end local colors = { ["reset color"]="\\\\27[0m", bright="\\\\27[1m", dim="\\\\27[2m", underscore="\\\\27[4m", @@ -47,8 +47,8 @@ lua> ".." for name, c in pairs(colors) do local color = "'"..c.."'"; local reset = "'"..colors["reset color"].."'"; - nomsu:define_compile_action(name, \(!! code location !!), function() return {expr=color}; end); - nomsu:define_compile_action(name.." %", \(!! code location !!), function(\%) + nomsu:define_compile_action(name, \(!! code location !!), function(__callsite) return {expr=color}; end); + nomsu:define_compile_action(name.." %", \(!! code location !!), function(__callsite, \%) return {expr=color..".."..nomsu:tree_to_lua(\%).expr..".."..reset}; end); end -- cgit v1.2.3