mirror of
https://github.com/lua/lua
synced 2026-09-29 04:35:58 +03:00
new "block" syntax (DO ... END)
This commit is contained in:
parent
9c965d0ffb
commit
f8c95fa9e8
1 changed files with 3 additions and 1 deletions
4
lua.stx
4
lua.stx
|
|
@ -1,6 +1,6 @@
|
|||
%{
|
||||
/*
|
||||
** $Id: lua.stx,v 1.14 1997/10/24 18:40:29 roberto Exp roberto $
|
||||
** $Id: lua.stx,v 1.15 1997/10/28 17:26:53 roberto Exp roberto $
|
||||
** Syntax analizer and code generator
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
|
|
@ -677,6 +677,8 @@ sc : /* empty */ | ';' ;
|
|||
|
||||
stat : IF cond THEN block SaveWord elsepart END { codeIf($2, $5); }
|
||||
|
||||
| DO block END
|
||||
|
||||
| WHILE GetPC cond DO block END
|
||||
{{
|
||||
int expsize = $3-$2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue