Fixed wrong error location reporting
This commit is contained in:
parent
eb1eb81c1b
commit
229fe3bffa
|
@ -458,9 +458,9 @@ namespace Upsilon.Parser
|
||||||
expression = new LiteralExpressionSyntax(nilToken, null);
|
expression = new LiteralExpressionSyntax(nilToken, null);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
_diagnostics.LogBadCharacter(new TextSpan(_position, 1));
|
_diagnostics.LogBadCharacter(Current.Span);
|
||||||
|
expression = new BadExpressionSyntax(Current.Span);
|
||||||
NextToken();
|
NextToken();
|
||||||
expression = new BadExpressionSyntax(new TextSpan(_position, 1));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return expression;
|
return expression;
|
||||||
|
|
Loading…
Reference in New Issue