Permalink
Browse files

more lineno

  • Loading branch information...
1 parent 54f1d9d commit f0966cf3cd79dd96df32bc98394e822c791c49b5 @fperrad committed Apr 23, 2012
Showing with 155 additions and 144 deletions.
  1. +7 −1 src/lua/lunokhod.lua
  2. +148 −143 src/lua/lunokhod.tp
View
@@ -1109,11 +1109,17 @@ end
local function exprstat (s, pos, buffer)
-- stat -> func | assignment
local buf = {}
+ local lineno = lineno
pos = primaryexpr(s, pos, buf)
- buffer[#buffer] = tconcat(buf)
pos = skip_ws(s, pos)
if tok_comma:match(s, pos) or tok_equal:match(s, pos) then
+ buffer[#buffer] = tconcat(buf)
return assignment(s, pos, buffer, 1)
+ else
+ buffer[#buffer] = '(!line '
+ buffer[#buffer] = lineno
+ buffer[#buffer] = ')'
+ buffer[#buffer] = tconcat(buf)
end
return pos
end
Oops, something went wrong.

0 comments on commit f0966cf

Please sign in to comment.