aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1995-10-06 10:10:53 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1995-10-06 10:10:53 -0300
commit025589f7720358802ed2ae2e017747dc6122a513 (patch)
tree3c278363bf8f85d81e9f88d46c5db99fa47d2a2c
parent68f337dfa617732646a4a974eb33b25daf45a1e2 (diff)
downloadlua-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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lex.c b/lex.c
index 675a944f..221a4b4b 100644
--- a/lex.c
+++ b/lex.c
@@ -1,4 +1,4 @@
1char *rcs_lex = "$Id: lex.c,v 2.16 1995/09/15 20:48:26 roberto Exp $"; 1char *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