diff options
Diffstat (limited to 'LuaSL/src/LuaSL_lexer.l')
-rw-r--r-- | LuaSL/src/LuaSL_lexer.l | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/LuaSL/src/LuaSL_lexer.l b/LuaSL/src/LuaSL_lexer.l index 15cfae2..876d30a 100644 --- a/LuaSL/src/LuaSL_lexer.l +++ b/LuaSL/src/LuaSL_lexer.l | |||
@@ -112,22 +112,9 @@ IDENTIFIER [[:alpha:]](_|[[:alpha:]]|[[:digit:]])* | |||
112 | 112 | ||
113 | int common(YYSTYPE *lval, char *text, LuaSL_yyparseParam *param, boolean checkIgnorable, int type) | 113 | int common(YYSTYPE *lval, char *text, LuaSL_yyparseParam *param, boolean checkIgnorable, int type) |
114 | { | 114 | { |
115 | int i; | ||
116 | |||
117 | for (i = 0; text[i] != '\0'; i++) | ||
118 | if (text[i] == '\n') | ||
119 | { | ||
120 | param->column = 0; | ||
121 | param->line++; | ||
122 | } | ||
123 | else if (text[i] == '\t') | ||
124 | param->column += 8 - (param->column % 8); | ||
125 | else | ||
126 | param->column++; | ||
127 | |||
128 | lval->token = tokens[type - lowestToken]; | 115 | lval->token = tokens[type - lowestToken]; |
129 | lval->line = param->line; | 116 | lval->line = yyget_lineno(param->scanner); |
130 | lval->column = param->column; | 117 | lval->column = yyget_column(param->scanner); |
131 | 118 | ||
132 | if (checkIgnorable) | 119 | if (checkIgnorable) |
133 | { | 120 | { |