예제 #1
0
 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;
 }
예제 #2
0
 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;
 }
예제 #3
0
 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;
 }
예제 #4
0
 Token MakeDelimitedWord() {
     var result = new Token(TokenType.Word, source.Until(() => !isWordContent(source.Type)).TrimEnd().Replace('_', ' '));
     if (source.Type == CharacterType.Separator) source.MoveNext();
     return result;
 }