public static bool IsConditionalContinuationDirective(ITextProvider text, ITokenStream stream) { if (stream.Current.Type == TokenType.At) { var name = stream.Peek(1); if (name.Type == TokenType.Identifier) return text.StartsWithOrdinal(name.Start, "else"); } return false; }
public static bool IsUrl(ITextProvider text, Token token) { switch (token.Type) { case TokenType.Function: case TokenType.Identifier: return text.StartsWithOrdinal(token.Start, "url"); default: return false; } }
public static bool IsUrl(ITextProvider text, Token token) { switch (token.Type) { case TokenType.Function: case TokenType.Identifier: return(text.StartsWithOrdinal(token.Start, "url")); default: return(false); } }
public static bool IsConditionalContinuationDirective(ITextProvider text, ITokenStream stream) { if (stream.Current.Type == TokenType.At) { var name = stream.Peek(1); if (name.Type == TokenType.Identifier) { return(text.StartsWithOrdinal(name.Start, "else")); } } return(false); }