From bfbe2845e6771ea791b1bc6c6e3966554eb8531f Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sat, 14 May 2016 03:27:30 -0700 Subject: [PATCH] actually implement path handling for .incasm --- lips/Lexer.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lips/Lexer.lua b/lips/Lexer.lua index 81ee4e8..91c8fb8 100644 --- a/lips/Lexer.lua +++ b/lips/Lexer.lua @@ -300,7 +300,10 @@ function Lexer:lex_include(_yield) if self.options.path then fn = self.options.path..fn end - local sublexer = Lexer(util.readfile(fn), fn, self.options) + + local new_options = setmetatable({}, {__index=self.options}) + new_options.path = fn:match(".*/") + local sublexer = Lexer(util.readfile(fn), fn, new_options) sublexer:lex(_yield) end