Lines Matching refs:tok
204 tok = Token(kind, text, line, column+1,
210 self.error(tok, "stray {!r} in program")
212 yield tok
230 def examine(self, tok): argument
246 def examine(self, tok): argument
263 def examine(self, tok): argument
264 if OBSOLETE_TYPE_RE_.match(tok.text):
265 self.reporter.error(tok, "use of {!r}")
276 def examine(self, tok): argument
278 if (tok.kind == "IDENT"
279 and tok.text in ("typedef", "__STD_TYPE")
280 and tok.context is None):
282 elif tok.kind == "PUNCTUATOR" and tok.text == ";" and self.in_typedef:
292 self.prev_token = tok
317 def examine(self, tok): argument
318 if tok.kind in ("WHITESPACE", "BLOCK_COMMENT",
322 elif (tok.kind == "IDENT" and tok.text == "typedef"
323 and tok.context is None):
325 self.reporter.error(tok, "typedef inside typedef")
327 self.typedef_tokens.append(tok)
329 elif tok.kind == "PUNCTUATOR" and tok.text == ";":
333 self.typedef_tokens.append(tok)
340 tok = self.typedef_tokens.pop(0)
341 if tok.kind == "IDENT" and OBSOLETE_TYPE_RE_.match(tok.text):
342 self.reporter.error(tok, "use of {!r}")
430 def error(self, tok, message): argument
433 message = message.format(tok.text)
435 self.fname, tok.line, tok.column, message))
449 for tok in tokenize_c(contents, self):
450 typedef_checker.examine(tok)