From 9a75d25c843b03e3671b71384fd48deb0607db43 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 11 Nov 2018 15:05:18 -0800 Subject: Lots of fixes to the upgrading and codegen/autoformatting pipeline, also deleted nomnom files, since they're mostly not needed anymore. --- nomsu_environment.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nomsu_environment.lua') diff --git a/nomsu_environment.lua b/nomsu_environment.lua index ac99246..a4ade61 100644 --- a/nomsu_environment.lua +++ b/nomsu_environment.lua @@ -122,6 +122,9 @@ local nomsu_environment = Importer({ local syntax_version = version and tonumber(version:match("^[0-9]+")) or max_parser_version local parse = Parsers[syntax_version] or Parsers[max_parser_version] local tree = parse(nomsu_code, source.filename) + if tree.shebang then + tree.version = tree.shebang:match("nomsu %-V[ ]*([%d.]*)") + end local find_errors find_errors = function(t) if t.type == "Error" then -- cgit v1.2.3