Specifies options for determining the extent of a word.
This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
|Finds a word or token containing a specified position, if any such word or token exists.|
|Find simple expressions, like *pFoo.|
|Finds words and tokens. See Remarks.|
|Finds words only. See Remarks.|
|Flag to mask WORDEXT_PREVIOUS and WORDEXT_NEXT.|
|Finds the word or token nearest to a specified position.|
|Finds the nearest word or token whose first character is greater than a specified position.|
|Finds the nearest word or token whose last character is less than a specified position.|
For the WORDEXT_FINDWORD value, "FINDWORD" refers any of the following:
For the WORDEXT_FINDTOKEN value, "FINDTOKEN" refers to any of the following:
keyword, identifier, or number
operator (for example, ++ or %)
delimiter (for example, quotation marks (") or comment marks (// or /))
Thus, by specifying a value of WORDEXT_FINDWORD, you return a word extent that corresponds to a keyword, a number, or an identifier. For example, if the text were "a," the "a" or the "1" could be returned, but the whole expression would not be returned. However, if you specify a value of WORDEXT_FINDTOKEN, then you would return any keyword, number, or identifier, or you would return operators, delimiters, or white space. Thus, if the text were "a ", any single character of the string could match, but any larger portion of the string would not.
The term "token" is not related to a language token in compiler terminology.