Lines Matching refs:id

119     def id(self):  member in Token
126 @id.setter
127 def id(self, new_id): member in Token
142 if self.id == 'defined':
143 return self.id
145 return "(ident %s)" % self.id
147 return self.id
150 return self.id
321 token_list.append((token.id, token.location.line,
324 token_list.append(token.id)
413 def expectId(self, id): argument
416 if self._index >= self._num_tokens or token.id != id:
419 id, token.id))
423 token = self.tokens[self._index].id
434 token = self.tokens[self._index].id
447 token = self.tokens[self._index].id
479 if t.id == tokMINUS and self._index + 1 < self._num_tokens:
485 if t.id == tokPLUS and self._index + 1 < self._num_tokens:
495 if t.id != tokDEFINED:
502 self.tokens[self._index].id == tokLPAREN):
520 return ("defined", t.id)
530 name = t.id
534 self.tokens[self._index].id != tokLPAREN):
542 id = self.tokens[self._index].id
543 if id == tokLPAREN:
545 elif depth == 1 and (id == tokCOMMA or id == tokRPAREN):
549 if id == tokRPAREN:
552 elif id == tokRPAREN:
578 node = (op.id, node, rhs)
586 return (op.id, self.parseExpression(self.precedence(op)))
589 if op.id == tokLPAREN:
593 elif op.id == "?":
597 elif op.id == '+' or op.id == '-' or op.kind == TokenKind.LITERAL:
601 elif op.id == tokDEFINED:
608 self.tokens[self._index].id))
612 return token.id in self.binaries
615 return token.id in self.unaries
618 return self.precedences.get(token.id)
968 tok.id = tokDEFINED
975 tok1.id = tokNOT
976 tok2.id = tokDEFINED
1034 if t.id == '{':
1038 if i < 2 or tokens[i-2].id != 'extern' or tokens[i-1].id != '"C"':
1042 elif t.id == '}':
1049 (tokens[i+1].id == ';' or
1050 tokens[i+1].id in ['else', '__attribute__',
1059 elif t.id == ';':
1064 elif t.id == ',' and t.cursor.kind == CursorKind.ENUM_DECL:
1136 expr = strip_space(' '.join([tok.id for tok in self.tokens]))
1144 result = "#error %s" % ' '.join([tok.id for tok in self.tokens])
1150 result += ''.join([tok.id for tok in self.tokens])
1220 b.tokens[i].id != "struct"):
1225 b.tokens[i + 2].id == "{" and b.tokens[i + 1].id in structs):
1232 b.tokens[j].id == "}" and
1234 b.tokens[j + 1].id == ";"):
1316 token_id = block.tokens[i].id
1320 if (i >= 2 and block.tokens[i-2].id == 'extern' and
1321 block.tokens[i-1].id == '"C"'):
1332 if block.tokens[i].id == ';':
1349 block.tokens[i-1].id in macros):
1362 if block.tokens[i].id == ')':
1366 elif block.tokens[i].id == '(':
1414 if (tok.kind == TokenKind.KEYWORD and tok.id == 'struct'
1415 and (i + 2) < len(b.tokens) and b.tokens[i + 2].id == '{'):
1416 struct_name = b.tokens[i + 1].id
1420 while end < len(b.tokens) and b.tokens[end].id != '}':
1423 while end < len(b.tokens) and b.tokens[end].id != ';':
1432 if tok.id in replacements:
1433 tok.id = replacements[tok.id]
1513 print ' ' * 2, t.id, t.kind, t.cursor.kind
1558 directive = tokens[j+1].id
1568 id = ''
1571 if (i + 1 < len(tokens) and tokens[i+1].id == '(' and
1575 id += tokens[i].id
1581 id += tokens[i].id
1587 lineno=t.location.line, identifier=id))
1598 directive = tokens[i+1].id