We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ea8b74 commit a7c5fadCopy full SHA for a7c5fad
src/OneScript.Language/LexicalAnalysis/SourceCodeIterator.cs
@@ -70,18 +70,8 @@ private void InitOnString(string code)
70
public int CurrentLine => _lineCounter;
71
72
public int CurrentColumn
73
- {
74
- get
75
76
- if (_startPosition == OUT_OF_TEXT)
77
78
- return OUT_OF_TEXT;
79
- }
80
-
81
- int start = GetLineBound(_lineCounter);
82
- return _index - start + 1;
83
84
+ => _startPosition == OUT_OF_TEXT ? OUT_OF_TEXT : _index - _lineBounds[^1] + 1;
+ // CurrentLine's start is last in _lineBounds
85
86
public char CurrentSymbol => _currentSymbol;
87
0 commit comments