mirror of
https://github.com/lua/lua.git
synced 2025-01-28 06:03:00 +08:00
nova forma de comentarios: de '#' ate' fim de linha (para uso de lua
como shell)
This commit is contained in:
parent
68f337dfa6
commit
025589f772
5
lex.c
5
lex.c
@ -1,4 +1,4 @@
|
|||||||
char *rcs_lex = "$Id: lex.c,v 2.16 1995/09/15 20:48:26 roberto Exp $";
|
char *rcs_lex = "$Id: lex.c,v 2.17 1995/10/03 18:06:10 roberto Exp $";
|
||||||
|
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
@ -185,7 +185,8 @@ int yylex (void)
|
|||||||
|
|
||||||
case '-':
|
case '-':
|
||||||
save_and_next();
|
save_and_next();
|
||||||
if (current != '-') return '-';
|
if (current != '-') return '-'; /* else goes through */
|
||||||
|
case '#':
|
||||||
do { next(); } while (current != '\n' && current != 0);
|
do { next(); } while (current != '\n' && current != 0);
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user