mirror of
https://github.com/CPunch/Cosmo.git
synced 2024-11-05 08:10:05 +00:00
fixed stack error
This commit is contained in:
parent
c42a72dfad
commit
65662e94f2
@ -1018,7 +1018,9 @@ static void forLoop(CParseState *pstate) {
|
||||
|
||||
consume(pstate, TOKEN_DO, "Expected 'do'");
|
||||
|
||||
beginScope(pstate); // fixes stack issues
|
||||
block(pstate); // parses until 'end'
|
||||
endScope(pstate);
|
||||
|
||||
writeJmpBack(pstate, loopStart);
|
||||
|
||||
|
@ -4,7 +4,7 @@ class test
|
||||
end
|
||||
|
||||
function print(self, i)
|
||||
local str = self.hello
|
||||
var str = self.hello
|
||||
|
||||
for (var x = i; x > 0; x=x-1) do
|
||||
str = str .. "!"
|
||||
|
Loading…
Reference in New Issue
Block a user