Skip to content

Commit b47b71a

Browse files
committed
Fix caret position for "unexpected indent"
1 parent 7f9cc93 commit b47b71a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/parser/antlr/Python3.g4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1807,7 +1807,7 @@ NEWLINE
18071807
this.emit(createIndentError(Python3Parser.TAB_ERROR));
18081808
}
18091809
indents.push(indent);
1810-
emit(commonToken(Python3Parser.INDENT, getText()));
1810+
emit(commonToken(Python3Parser.INDENT, ""));
18111811
}
18121812
else {
18131813
// Possibly emit more than 1 DEDENT token.

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/parser/antlr/Python3Lexer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ private void NEWLINE_action(RuleContext _localctx, int actionIndex) {
419419
}
420420
else if (indent > previous) {
421421
indents.push(indent);
422-
emit(commonToken(Python3Parser.INDENT, getText()));
422+
emit(commonToken(Python3Parser.INDENT, ""));
423423
}
424424
else {
425425
// Possibly emit more than 1 DEDENT token.

0 commit comments

Comments
 (0)