MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / parseTypeRef

Method parseTypeRef

extern/cloop/src/cloop/Parser.cpp:491–530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

489}
490
491TypeRef Parser::parseTypeRef()
492{
493 TypeRef typeRef;
494 lexer->getToken(typeRef.token);
495
496 if (typeRef.token.type == Token::TYPE_CONST)
497 {
498 typeRef.isConst = true;
499 lexer->getToken(typeRef.token);
500 }
501
502 switch (typeRef.token.type)
503 {
504 case Token::TYPE_VOID:
505 case Token::TYPE_BOOLEAN:
506 case Token::TYPE_INT:
507 case Token::TYPE_INT64:
508 case Token::TYPE_INTPTR:
509 case Token::TYPE_STRING:
510 case Token::TYPE_UCHAR:
511 case Token::TYPE_UINT:
512 case Token::TYPE_UINT64:
513 case Token::TYPE_IDENTIFIER:
514 break;
515
516 default:
517 error(typeRef.token, string("Syntax error at '") +
518 typeRef.token.text + "'. Expected a type.");
519 break;
520 }
521
522 Token token2;
523 lexer->getToken(token2);
524 if (token2.type == TOKEN('*'))
525 typeRef.isPointer = true;
526 else
527 lexer->pushToken(token2);
528
529 return typeRef;
530}
531
532void Parser::syntaxError(const Token& token)
533{

Callers

nothing calls this directly

Calls 2

pushTokenMethod · 0.80
errorFunction · 0.50

Tested by

no test coverage detected