diff options
Diffstat (limited to 'code_obj.lua')
| -rw-r--r-- | code_obj.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/code_obj.lua b/code_obj.lua index 848ed84..dcdd95a 100644 --- a/code_obj.lua +++ b/code_obj.lua @@ -22,17 +22,17 @@ Source = immutable({ return filename, start, stop end, from_string = function(self, str) - local filename, start, stop = str:match("^(.-)%[(%d+):(%d+)%]$") + local filename, start, stop = str:match("^@(.-)%[(%d+):(%d+)%]$") if not (filename) then - filename, start = str:match("^(.-)%[(%d+)%]$") + filename, start = str:match("^@(.-)%[(%d+)%]$") end return Source(filename or str, tonumber(start or 1), tonumber(stop)) end, __tostring = function(self) if self.stop then - return "\"" .. tostring(self.filename) .. "[" .. tostring(self.start) .. ":" .. tostring(self.stop) .. "]\"" + return "@" .. tostring(self.filename) .. "[" .. tostring(self.start) .. ":" .. tostring(self.stop) .. "]" else - return "\"" .. tostring(self.filename) .. "[" .. tostring(self.start) .. "]\"" + return "@" .. tostring(self.filename) .. "[" .. tostring(self.start) .. "]" end end, __lt = function(self, other) |
