mirror of
https://github.com/notwa/lips
synced 2025-03-09 19:32:49 -07:00
parse variable definitions as expressions
This commit is contained in:
parent
6bae5647c8
commit
63ddf558df
1 changed files with 7 additions and 0 deletions
|
@ -406,6 +406,13 @@ function Lexer:lex(_yield)
|
||||||
end
|
end
|
||||||
self:nextc()
|
self:nextc()
|
||||||
yield('VAR', buff)
|
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
|
elseif self.chr == ']' then
|
||||||
self:error('unmatched closing bracket')
|
self:error('unmatched closing bracket')
|
||||||
elseif self.chr == '(' then
|
elseif self.chr == '(' then
|
||||||
|
|
Loading…
Add table
Reference in a new issue