Lines Matching refs:TokenPtr
310 const char *TokenPtr = BufferPtr; in lexCommentText() local
311 assert(TokenPtr < CommentEnd); in lexCommentText()
312 while (TokenPtr != CommentEnd) { in lexCommentText()
313 switch(*TokenPtr) { in lexCommentText()
320 (*TokenPtr == '@') ? tok::at_command : tok::backslash_command; in lexCommentText()
321 TokenPtr++; in lexCommentText()
322 if (TokenPtr == CommentEnd) { in lexCommentText()
323 formTextToken(T, TokenPtr); in lexCommentText()
326 char C = *TokenPtr; in lexCommentText()
335 TokenPtr++; in lexCommentText()
336 if (C == ':' && TokenPtr != CommentEnd && *TokenPtr == ':') { in lexCommentText()
338 TokenPtr++; in lexCommentText()
340 StringRef UnescapedText(BufferPtr + 1, TokenPtr - (BufferPtr + 1)); in lexCommentText()
341 formTokenWithChars(T, TokenPtr, tok::text); in lexCommentText()
347 if (!isCommandNameStartCharacter(*TokenPtr)) { in lexCommentText()
348 formTextToken(T, TokenPtr); in lexCommentText()
352 TokenPtr = skipCommandName(TokenPtr, CommentEnd); in lexCommentText()
353 unsigned Length = TokenPtr - (BufferPtr + 1); in lexCommentText()
357 if (Length == 1 && TokenPtr[-1] == 'f' && TokenPtr != CommentEnd) { in lexCommentText()
358 C = *TokenPtr; in lexCommentText()
360 TokenPtr++; in lexCommentText()
373 getSourceLocation(TokenPtr)); in lexCommentText()
378 formTokenWithChars(T, TokenPtr, tok::unknown_command); in lexCommentText()
385 setupAndLexVerbatimBlock(T, TokenPtr, *BufferPtr, Info); in lexCommentText()
389 setupAndLexVerbatimLine(T, TokenPtr, Info); in lexCommentText()
392 formTokenWithChars(T, TokenPtr, CommandKind); in lexCommentText()
402 TokenPtr++; in lexCommentText()
403 if (TokenPtr == CommentEnd) { in lexCommentText()
404 formTextToken(T, TokenPtr); in lexCommentText()
407 const char C = *TokenPtr; in lexCommentText()
413 formTextToken(T, TokenPtr); in lexCommentText()
420 TokenPtr = skipNewline(TokenPtr, CommentEnd); in lexCommentText()
421 formTokenWithChars(T, TokenPtr, tok::newline); in lexCommentText()
428 size_t End = StringRef(TokenPtr, CommentEnd - TokenPtr). in lexCommentText()
431 TokenPtr += End; in lexCommentText()
433 TokenPtr = CommentEnd; in lexCommentText()
434 formTextToken(T, TokenPtr); in lexCommentText()
548 const char *TokenPtr = BufferPtr; in lexHTMLCharacterReference() local
549 assert(*TokenPtr == '&'); in lexHTMLCharacterReference()
550 TokenPtr++; in lexHTMLCharacterReference()
551 if (TokenPtr == CommentEnd) { in lexHTMLCharacterReference()
552 formTextToken(T, TokenPtr); in lexHTMLCharacterReference()
558 char C = *TokenPtr; in lexHTMLCharacterReference()
560 NamePtr = TokenPtr; in lexHTMLCharacterReference()
561 TokenPtr = skipNamedCharacterReference(TokenPtr, CommentEnd); in lexHTMLCharacterReference()
564 TokenPtr++; in lexHTMLCharacterReference()
565 if (TokenPtr == CommentEnd) { in lexHTMLCharacterReference()
566 formTextToken(T, TokenPtr); in lexHTMLCharacterReference()
569 C = *TokenPtr; in lexHTMLCharacterReference()
571 NamePtr = TokenPtr; in lexHTMLCharacterReference()
572 TokenPtr = skipDecimalCharacterReference(TokenPtr, CommentEnd); in lexHTMLCharacterReference()
575 TokenPtr++; in lexHTMLCharacterReference()
576 NamePtr = TokenPtr; in lexHTMLCharacterReference()
577 TokenPtr = skipHexCharacterReference(TokenPtr, CommentEnd); in lexHTMLCharacterReference()
579 formTextToken(T, TokenPtr); in lexHTMLCharacterReference()
583 formTextToken(T, TokenPtr); in lexHTMLCharacterReference()
586 if (NamePtr == TokenPtr || TokenPtr == CommentEnd || in lexHTMLCharacterReference()
587 *TokenPtr != ';') { in lexHTMLCharacterReference()
588 formTextToken(T, TokenPtr); in lexHTMLCharacterReference()
591 StringRef Name(NamePtr, TokenPtr - NamePtr); in lexHTMLCharacterReference()
592 TokenPtr++; // Skip semicolon. in lexHTMLCharacterReference()
602 formTextToken(T, TokenPtr); in lexHTMLCharacterReference()
605 formTokenWithChars(T, TokenPtr, tok::text); in lexHTMLCharacterReference()
634 const char *TokenPtr = BufferPtr; in lexHTMLStartTag() local
635 char C = *TokenPtr; in lexHTMLStartTag()
637 TokenPtr = skipHTMLIdentifier(TokenPtr, CommentEnd); in lexHTMLStartTag()
638 StringRef Ident(BufferPtr, TokenPtr - BufferPtr); in lexHTMLStartTag()
639 formTokenWithChars(T, TokenPtr, tok::html_ident); in lexHTMLStartTag()
644 TokenPtr++; in lexHTMLStartTag()
645 formTokenWithChars(T, TokenPtr, tok::html_equals); in lexHTMLStartTag()
649 const char *OpenQuote = TokenPtr; in lexHTMLStartTag()
650 TokenPtr = skipHTMLQuotedString(TokenPtr, CommentEnd); in lexHTMLStartTag()
651 const char *ClosingQuote = TokenPtr; in lexHTMLStartTag()
652 if (TokenPtr != CommentEnd) // Skip closing quote. in lexHTMLStartTag()
653 TokenPtr++; in lexHTMLStartTag()
654 formTokenWithChars(T, TokenPtr, tok::html_quoted_string); in lexHTMLStartTag()
660 TokenPtr++; in lexHTMLStartTag()
661 formTokenWithChars(T, TokenPtr, tok::html_greater); in lexHTMLStartTag()
665 TokenPtr++; in lexHTMLStartTag()
666 if (TokenPtr != CommentEnd && *TokenPtr == '>') { in lexHTMLStartTag()
667 TokenPtr++; in lexHTMLStartTag()
668 formTokenWithChars(T, TokenPtr, tok::html_slash_greater); in lexHTMLStartTag()
670 formTextToken(T, TokenPtr); in lexHTMLStartTag()