/// <summary> /// Creates new struct with updated <see cref="CompleteToken.TokenText"/>. /// </summary> public static CompleteToken WithToken(this CompleteToken t, Tokens token) { return(new CompleteToken(token, t.TokenValue, t.TokenPosition, t.TokenText)); }
/// <summary> /// Gets value indicating the token is an ignored token - whitespace or comment. /// </summary> public static bool IsWhitespace(this CompleteToken t) => t.Token == Tokens.T_WHITESPACE || t.Token == Tokens.T_COMMENT; // not T_DOC_COMMENT
/// <summary> /// Creates new struct with updated <see cref="CompleteToken.TokenText"/>. /// </summary> public static CompleteToken WithTokenText(this CompleteToken t, string text) { return(new CompleteToken(t.Token, t.TokenValue, t.TokenPosition, text)); }