Lines Matching refs:RawTok
28 static bool isSameToken(Token &RawTok, Token &PPTok) {
31 if (PPTok.getKind() == RawTok.getKind() &&
32 PPTok.getIdentifierInfo() == RawTok.getIdentifierInfo())
39 PPTok.getIdentifierInfo() == RawTok.getIdentifierInfo())
74 Token RawTok;
76 RawLex.LexFromRawLexer(RawTok);
81 if (RawTok.is(tok::raw_identifier))
82 PP.LookUpIdentifierInfo(RawTok);
84 RawTokens.push_back(RawTok);
85 } while (RawTok.isNot(tok::eof));
100 Token RawTok = GetNextRawTok(RawTokens, CurRawTok, false);
114 while (RawTok.isNot(tok::eof) || PPTok.isNot(tok::eof)) {
127 if (RawTok.is(tok::hash) && RawTok.isAtStartOfLine()) {
134 RB.InsertTextAfter(SM.getFileOffset(RawTok.getLocation()), "//");
140 RB.InsertTextAfter(SM.getFileOffset(RawTok.getLocation()), "//");
146 RawTok = GetNextRawTok(RawTokens, CurRawTok, false);
147 while (!RawTok.isAtStartOfLine() && RawTok.isNot(tok::eof))
148 RawTok = GetNextRawTok(RawTokens, CurRawTok, false);
155 unsigned RawOffs = SM.getFileOffset(RawTok.getLocation());
158 if (PPOffs == RawOffs && isSameToken(RawTok, PPTok)) {
159 RawTok = GetNextRawTok(RawTokens, CurRawTok, false);
168 // comments. Add a leading space if RawTok didn't have one.
169 bool HasSpace = RawTok.hasLeadingSpace();
174 EndPos = RawOffs+RawTok.getLength();
176 RawTok = GetNextRawTok(RawTokens, CurRawTok, true);
177 RawOffs = SM.getFileOffset(RawTok.getLocation());
179 if (RawTok.is(tok::comment)) {
181 RawTok = GetNextRawTok(RawTokens, CurRawTok, false);
185 } while (RawOffs <= PPOffs && !RawTok.isAtStartOfLine() &&
186 (PPOffs != RawOffs || !isSameToken(RawTok, PPTok)));