Assembly: Microsoft.VisualStudio.TextManager.Interop (in microsoft.visualstudio.textmanager.interop.dll)
|WORDEXT_CURRENT||Finds a word or token containing a specified position, if any such word or token exists.|
|WORDEXT_FINDEXPRESSION||Find simple expressions, like *pFoo.|
|WORDEXT_FINDTOKEN||Finds words and tokens. See Remarks.|
|WORDEXT_FINDWORD||Finds words only. See Remarks.|
|WORDEXT_MOVETYPE_MASK||Flag to mask WORDEXT_PREVIOUS and WORDEXT_NEXT.|
|WORDEXT_NEAREST||Finds the word or token nearest to a specified position.|
|WORDEXT_NEXT||Finds the nearest word or token whose first character is greater than a specified position.|
|WORDEXT_PREVIOUS||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.