indentAction
This commit is contained in:
parent
4def48d206
commit
7f24975092
3 changed files with 15 additions and 11 deletions
|
|
@ -18,9 +18,9 @@
|
|||
for (int i = 0; i < yyleng; i++)
|
||||
spaces += (yytext[i] == '\t') ? 8 : 1;
|
||||
|
||||
int result = indent_helper.processLine(spaces);
|
||||
if (result > 0) return yy::parser::token::TOK_INDENT;
|
||||
if (result < 0) return yy::parser::token::TOK_DEDENT;
|
||||
IndentAction result = indent_helper.processLine(spaces);
|
||||
if (result == IndentAction::Indent) return yy::parser::token::TOK_INDENT;
|
||||
if (result == IndentAction::Dedent) return yy::parser::token::TOK_DEDENT;
|
||||
}
|
||||
|
||||
\n { return yy::parser::token::TOK_NEWLINE; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue