
My dynamic language file contains the following:
<RegexPatternGroup TokenID="1" TokenKey="LineEnd" PatternValue="{LineTerminatorMacro}" IsWhitespace="True" />
<RegexPatternGroup TokenID="3" TokenKey="Whitespace" PatternValue="{WhitespaceMacro}+" IsWhitespace="True" />
I have the following text in the syntax editor:
Select abc
My code does the following:
Dim ts As TextStream = editor.Document.GetTextStream(8)
>>> ts.ParserText is 'abc' << correct
ts.GoToPreviousNonWhitespaceOrCommentToken()
>>> ts.ParserText is ' ' << incorrect
Since I am telling it to skip whitespace it should be pointing to tokenIndex 0 ('Select') not to tokenIndex 1 (' ').
Is there something I need to set in order to force it to honor the NOT whitespace or Comments part of this function?
Just as an aside...
What is the simplest way to create a TextStream that is pointing to the current cursor position?