diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1995-10-06 10:10:53 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1995-10-06 10:10:53 -0300 |
commit | 025589f7720358802ed2ae2e017747dc6122a513 (patch) | |
tree | 3c278363bf8f85d81e9f88d46c5db99fa47d2a2c | |
parent | 68f337dfa617732646a4a974eb33b25daf45a1e2 (diff) | |
download | lua-025589f7720358802ed2ae2e017747dc6122a513.tar.gz lua-025589f7720358802ed2ae2e017747dc6122a513.tar.bz2 lua-025589f7720358802ed2ae2e017747dc6122a513.zip |
nova forma de comentarios: de '#' ate' fim de linha (para uso de lua
como shell)
-rw-r--r-- | lex.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | char *rcs_lex = "$Id: lex.c,v 2.16 1995/09/15 20:48:26 roberto Exp $"; | 1 | char *rcs_lex = "$Id: lex.c,v 2.17 1995/10/03 18:06:10 roberto Exp $"; |
2 | 2 | ||
3 | 3 | ||
4 | #include <ctype.h> | 4 | #include <ctype.h> |
@@ -185,7 +185,8 @@ int yylex (void) | |||
185 | 185 | ||
186 | case '-': | 186 | case '-': |
187 | save_and_next(); | 187 | save_and_next(); |
188 | if (current != '-') return '-'; | 188 | if (current != '-') return '-'; /* else goes through */ |
189 | case '#': | ||
189 | do { next(); } while (current != '\n' && current != 0); | 190 | do { next(); } while (current != '\n' && current != 0); |
190 | continue; | 191 | continue; |
191 | 192 | ||