Lines Matching refs:Tok
39 Token Tok; in lex() local
40 Tok.Data = &Code[Offset]; in lex()
41 Tok.Length = CT.getLength(); in lex()
42 Tok.Kind = CT.getKind(); in lex()
63 Tok.Indent = Indent; in lex()
64 Tok.Line = Line; in lex()
67 Tok.setFlag(LexFlags::StartsPPLine); in lex()
69 Tok.setFlag(LexFlags::NeedsCleaning); in lex()
71 Tok.OriginalIndex = TokenIndex++; in lex()
72 Result.push(Tok); in lex()
84 for (auto Tok : Code.tokens()) { in cook() local
85 if (Tok.flag(LexFlags::NeedsCleaning)) { in cook()
88 const char *Pos = Tok.text().begin(); in cook()
89 while (Pos < Tok.text().end()) { in cook()
107 if (Tok.Kind == tok::raw_identifier) { in cook()
112 Tok.Data = Text.copy(*CleanedStorage).data(); in cook()
113 Tok.Length = Text.size(); in cook()
114 Tok.Flags &= ~static_cast<decltype(Tok.Flags)>(LexFlags::NeedsCleaning); in cook()
117 if (Tok.Kind == tok::raw_identifier) { in cook()
119 Tok.Kind = Identifiers.get(Tok.text()).getTokenID(); in cook()
120 } else if (Tok.Kind == tok::greatergreater) { in cook()
123 assert(Tok.text() == ">>"); in cook()
124 Tok.Kind = tok::greater; in cook()
125 Tok.Length = 1; in cook()
126 Result.push(Tok); in cook()
128 Tok.Data = Tok.text().data() + 1; in cook()
131 Result.push(std::move(Tok)); in cook()