Token MakeQuotedWord() { var quote = source.Content; source.MoveNext(); var result = new Token(TokenType.Word, source.Until(() => source.Type == CharacterType.Quote && source.Content == quote)); source.MoveNext(); return result; }
Token MakeDelimitedWord() { source.Start(); source.MoveWhile(() => isWordContent(source)); var result = new Token(TokenType.Word, source.FromStart.TrimEnd()); if (source.Type == CharacterType.Separator) source.MoveNext(); return result; }
Token MakeQuotedWord() { string quote = source.Content; source.MoveNext(); source.Start(); source.MoveWhile(() => source.Content != quote && source.Type != CharacterType.End); var result = new Token(TokenType.Word, source.FromStart); source.MoveNext(); return result; }
Token MakeDelimitedWord() { var result = new Token(TokenType.Word, source.Until(() => !isWordContent(source.Type)).TrimEnd().Replace('_', ' ')); if (source.Type == CharacterType.Separator) source.MoveNext(); return result; }