Class SourceTokenSearcher
- Namespace
- gudusoft.gsqlparser.pp.utils
- Assembly
- gudusoft.gsqlparser.dll
public class SourceTokenSearcher
- Inheritance
-
SourceTokenSearcher
- Inherited Members
Methods
IndexOf(TSourceTokenList, int, int, string)
search the source token in the source token list from the top
public static int IndexOf(TSourceTokenList list, int startPos, int endPos, string text)
Parameters
listTSourceTokenListstartPosintendPosinttextstring
Returns
- int
position
IndexOf(TSourceTokenList, int, int, ETokenType)
search the source token in the source token list from the top
public static int IndexOf(TSourceTokenList list, int startPos, int endPos, ETokenType type)
Parameters
listTSourceTokenListstartPosintendPosinttypeETokenType@return
Returns
IndexOf(TSourceTokenList, int, string)
search the source token in the source token list from the top
public static int IndexOf(TSourceTokenList list, int startPos, string text)
Parameters
listTSourceTokenListstartPosinttextstring@return
Returns
LastIndexOf(TSourceTokenList, int, int, string)
search the source token in the source token list from the end
public static int LastIndexOf(TSourceTokenList list, int startPos, int endPos, string text)
Parameters
listTSourceTokenListstartPosintendPosinttextstring
Returns
- int
position
LastIndexOf(TSourceTokenList, int, string)
search the source token in the source token list from the end
public static int LastIndexOf(TSourceTokenList list, int endPos, string text)
Parameters
listTSourceTokenListendPosinttextstring@return
Returns
backforwardSearch(TSourceToken, int, string)
backward search the source token
public static TSourceToken backforwardSearch(TSourceToken token, int backsearchSize, string text)
Parameters
tokenTSourceTokenbacksearchSizeinttextstring@return
Returns
backforwardSearchNotWhitespaceAndReturnToken(TSourceToken, int, string)
public static TSourceToken backforwardSearchNotWhitespaceAndReturnToken(TSourceToken endToken, int backforwardSearchSize, string text)
Parameters
endTokenTSourceTokenbackforwardSearchSizeinttextstring
Returns
firstNotWhitespaceAndReturnToken(TSourceTokenList, int, int)
get first token which is not whitespace and return token
public static TSourceToken firstNotWhitespaceAndReturnToken(TSourceTokenList list, int startPos, int endPos)
Parameters
listTSourceTokenListstartPosintendPosint@return
Returns
firstSelectNotWhitespaceAndReturnToken(TSourceTokenList, int, string)
forward search the token which is the first not whitespace or return token, and its value is a fixed text
public static TSourceToken firstSelectNotWhitespaceAndReturnToken(TSourceTokenList list, int startPos, string text)
Parameters
listTSourceTokenListstartPosinttextstring@return
Returns
firstSelectedToken(TSourceTokenList, int, int, string)
public static TSourceToken firstSelectedToken(TSourceTokenList list, int startPos, int endPos, string text)
Parameters
listTSourceTokenListstartPosintendPosinttextstring
Returns
forwardSearch(TSourceToken, int, string)
forward search the source token
public static TSourceToken forwardSearch(TSourceToken token, int forwardSearchSize, string text)
Parameters
tokenTSourceTokenforwardSearchSizeinttextstring@return
Returns
isNewLineToken(TSourceToken)
public static bool isNewLineToken(TSourceToken token)
Parameters
tokenTSourceToken
Returns
isSimpleComment(TSourceToken)
public static bool isSimpleComment(TSourceToken token)
Parameters
tokenTSourceToken
Returns
lastNotWhitespaceAndReturnToken(TSourceTokenList, int)
get last token which is not whitespace and return token
public static TSourceToken lastNotWhitespaceAndReturnToken(TSourceTokenList list, int endPos)
Parameters
listTSourceTokenListendPosint@return
Returns
lastNotWhitespaceAndReturnToken(TSourceTokenList, int, int)
get last token which is not whitespace and return token
public static TSourceToken lastNotWhitespaceAndReturnToken(TSourceTokenList list, int startPos, int endPos)
Parameters
listTSourceTokenListstartPosintendPosint@return
Returns
lastSelectedNotWhitespaceAndReturnToken(TSourceToken, string)
backward search the token which is the first not whitespace or return token, and its value is a fixed text
public static TSourceToken lastSelectedNotWhitespaceAndReturnToken(TSourceToken token, string text)
Parameters
tokenTSourceTokentextstring@return
Returns
lastSelectedNotWhitespaceAndReturnToken(TSourceTokenList, int, string)
backward search the token which is the first not whitespace or return token, and its value is a fixed text
public static TSourceToken lastSelectedNotWhitespaceAndReturnToken(TSourceTokenList list, int endPos, string text)
Parameters
listTSourceTokenListendPosinttextstring
Returns
lastSelectedToken(TSourceTokenList, int, int, string)
public static TSourceToken lastSelectedToken(TSourceTokenList list, int startPos, int endPos, string text)
Parameters
listTSourceTokenListstartPosintendPosinttextstring