Home | History | Annotate | Download | only in Parse

Lines Matching refs:tok

28   switch (Tok.getKind()) {
32 case tok::period: // designator: '.' identifier
35 case tok::l_square: { // designator: array-designator
43 case tok::equal:
44 case tok::r_square:
48 case tok::amp:
49 case tok::kw_this:
50 case tok::identifier:
64 case tok::identifier: // designation: identifier ':'
65 return PP.LookAhead(0).is(tok::colon);
73 switch (Tok.getKind()) {
74 case tok::equal:
75 case tok::amp:
76 case tok::identifier:
77 case tok::kw_this:
83 case tok::comma:
89 case tok::r_square: {
96 tok::TokenKind Kind = Tok.getKind();
98 return Kind == tok::equal;
155 if (Tok.is(tok::identifier)) {
156 const IdentifierInfo *FieldName = Tok.getIdentifierInfo();
164 assert(Tok.is(tok::colon) && "MayBeDesignationStart not working properly!");
183 while (Tok.is(tok::period) || Tok.is(tok::l_square)) {
184 if (Tok.is(tok::period)) {
188 if (Tok.isNot(tok::identifier)) {
189 Diag(Tok.getLocation(), diag::err_expected_field_designator);
193 Desig.AddDesignator(Designator::getField(Tok.getIdentifierInfo(), DotLoc,
194 Tok.getLocation()));
200 assert(Tok.is(tok::l_square) && "Unexpected token!");
221 BalancedDelimiterTracker T(*this, tok::l_square);
233 if (Tok.is(tok::identifier) && Tok.getIdentifierInfo() == Ident_super &&
234 NextToken().isNot(tok::period) &&
247 SkipUntil(tok::r_square);
266 } else if (getLangOpts().ObjC1 && Tok.is(tok::identifier)) {
267 IdentifierInfo *II = Tok.getIdentifierInfo();
268 SourceLocation IILoc = Tok.getLocation();
276 NextToken().is(tok::period),
288 SkipUntil(tok::r_square);
315 SkipUntil(tok::r_square);
324 if (getLangOpts().ObjC1 && Tok.isNot(tok::ellipsis) &&
325 Tok.isNot(tok::r_square)) {
326 CheckArrayDesignatorSyntax(*this, Tok.getLocation(), Desig);
334 if (Tok.isNot(tok::ellipsis)) {
338 Diag(Tok, diag::ext_gnu_array_range);
343 SkipUntil(tok::r_square);
363 if (Tok.is(tok::equal)) {
376 Diag(Tok, diag::ext_gnu_missing_equal_designator)
377 << FixItHint::CreateInsertion(Tok.getLocation(), "= ");
378 return Actions.ActOnDesignatedInitializer(Desig, Tok.getLocation(),
382 Diag(Tok, diag::err_expected_equal_designator);
402 BalancedDelimiterTracker T(*this, tok::l_brace);
410 if (Tok.is(tok::r_brace)) {
422 if (getLangOpts().MicrosoftExt && (Tok.is(tok::kw___if_exists) ||
423 Tok.is(tok::kw___if_not_exists))) {
425 if (Tok.isNot(tok::comma)) break;
428 if (Tok.is(tok::r_brace)) break;
442 if (Tok.is(tok::ellipsis))
459 if (Tok.isNot(tok::comma)) {
460 SkipUntil(tok::r_brace, false, true);
466 if (Tok.isNot(tok::comma)) break;
472 if (Tok.is(tok::r_brace)) break;
494 BalancedDelimiterTracker Braces(*this, tok::l_brace);
496 Diag(Tok, diag::err_expected_lbrace);
515 while (Tok.isNot(tok::eof)) {
525 if (Tok.is(tok::ellipsis))
534 if (Tok.is(tok::comma)) {
539 if (Tok.is(tok::r_brace))