From 706811fed4a91d90a61530fc4c790303d41c566d Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 14 Jan 2019 18:00:59 -0800 Subject: Added warning for nomsu -c foo.lua --- nomsu.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nomsu.lua') diff --git a/nomsu.lua b/nomsu.lua index ff1e3fe..a600e9b 100644 --- a/nomsu.lua +++ b/nomsu.lua @@ -173,6 +173,9 @@ run = function() nomsu_environment._1_parsed(NomsuCode:from(source, code)) print("Parse succeeded: " .. tostring(filename)) elseif args.compile then + if filename:match("%.lua$") then + error("Cannot compile a lua file (expected a nomsu file as input)") + end local output if filename == 'stdin' then output = io.output() -- cgit v1.2.3