Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix parser not setting file name in parsed instruction objects

  • Loading branch information...
commit 8fb6e3d4cd2e97054c2d87dc0b849154c0345839 1 parent c646ec2
@bartman authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lua/dcpu16/parser.lua
View
6 lua/dcpu16/parser.lua
@@ -237,6 +237,7 @@ function DP.new()
if b.var then
table.insert(m.vars, b.var)
elseif b.op then
+ b.program = parsing_file
b.line = ct_line
table.insert(m.code, b)
elseif b[1] == 'macro_end' then
@@ -338,7 +339,10 @@ function DP.new()
return a
end
- if not b.line then b.line = ct_line end
+ if not b.line then
+ b.program = parsing_file
+ b.line = ct_line
+ end
if type(a) ~= 'table' then
-- this is the start token
Please sign in to comment.
Something went wrong with that request. Please try again.