Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }