minor fixes
This commit is contained in:
parent
60eaba951a
commit
0bc67209b9
4 changed files with 24 additions and 14 deletions
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
%{
|
||||
#include "scanner.hpp"
|
||||
#include "indent_helper.hpp"
|
||||
#include "indent_stack.hpp"
|
||||
|
||||
%}
|
||||
|
||||
|
|
@ -14,8 +14,8 @@
|
|||
^[ \t]*#.*\n { /* Ignore comment-only lines */ }
|
||||
|
||||
^[ \t]* {
|
||||
int col = indent_helper.calculateColumn(yytext, yyleng);
|
||||
auto action = indent_helper.processLine(col);
|
||||
int col = indent_stack.calculateColumn(yytext, yyleng);
|
||||
auto action = indent_stack.updateIndentation(col);
|
||||
|
||||
if (action == IndentAction::Indent) return yy::parser::token::TOK_INDENT;
|
||||
if (action == IndentAction::Dedent) return yy::parser::token::TOK_DEDENT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue