1
0
Fork 0
mirror of https://github.com/notwa/lips synced 2024-04-30 00:53:23 -07:00

parse variable definitions as expressions

This commit is contained in:
Connor Olding 2016-11-27 21:37:57 -08:00
parent 6bae5647c8
commit 63ddf558df

View File

@ -406,6 +406,13 @@ function Lexer:lex(_yield)
end
self:nextc()
yield('VAR', buff)
self:read_spaces()
if self.chr == '@' then
-- old syntax; nothing to do here
else
buff = self:read_chars('[^\n]')
yield('EXPR', buff)
end
elseif self.chr == ']' then
self:error('unmatched closing bracket')
elseif self.chr == '(' then