indentAction

This commit is contained in:
bronku 2025-11-25 15:48:15 +01:00
parent 4def48d206
commit 7f24975092
3 changed files with 15 additions and 11 deletions

View file

@ -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; }