Beispiel #1
0
 /// <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));
 }
Beispiel #2
0
 /// <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
Beispiel #3
0
 /// <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));
 }