Lines Matching defs:DO
89 // Makes code slightly more readable. The meaning of "DO(foo)" is
92 #define DO(STATEMENT) if (STATEMENT) {} else return false
185 DO(ConsumeInteger64(max_value, &value, error));
465 DO(Consume("syntax", "File must begin with 'syntax = \"proto2\";'."));
466 DO(Consume("="));
469 DO(ConsumeString(&syntax, "Expected syntax identifier."));
470 DO(ConsumeEndOfDeclaration(";", NULL));
531 DO(Consume("message"));
537 DO(ConsumeIdentifier(message->mutable_name(), "Expected message name."));
539 DO(ParseMessageBlock(message, message_location));
579 DO(ConsumeEndOfDeclaration("{", &message_location));
654 DO(ParseLabel(&label));
664 DO(ParseType(&type, &type_name));
680 DO(ConsumeIdentifier(field->mutable_name(), "Expected field name."));
682 DO(Consume("=", "Missing field number."));
691 DO(ConsumeInteger(&number, "Expected field number."));
696 DO(ParseFieldOptions(field, field_location));
739 DO(ParseMessageBlock(group, group_location));
745 DO(ConsumeEndOfDeclaration(";", &field_location));
758 DO(Consume("["));
761 do {
765 DO(ParseDefaultAssignment(field, field_location));
767 DO(ParseOption(field->mutable_options(), location, OPTION_ASSIGNMENT));
771 DO(Consume("]"));
782 DO(Consume("default"));
783 DO(Consume("="));
794 DO(ConsumeIdentifier(default_value, "Expected identifier."));
820 DO(ConsumeInteger64(max_value, &value, "Expected integer."));
842 DO(ConsumeInteger64(max_value, &value, "Expected integer."));
857 DO(ConsumeNumber(&value, "Expected number."));
874 DO(ConsumeString(default_value, "Expected string."));
878 DO(ConsumeString(default_value, "Expected string."));
883 DO(ConsumeIdentifier(default_value, "Expected identifier."));
900 DO(Consume("("));
908 DO(ConsumeIdentifier(&identifier, "Expected identifier."));
912 DO(Consume("."));
914 DO(ConsumeIdentifier(&identifier, "Expected identifier."));
919 DO(Consume(")"));
924 DO(ConsumeIdentifier(&identifier, "Expected identifier."));
933 // We do NOT use ConsumeEndOfStatement for this brace because it's delimiting
935 DO(Consume("{"));
974 DO(Consume("option"));
991 DO(ParseOptionNamePart(uninterpreted_option, part_location));
995 DO(Consume("."));
998 DO(ParseOptionNamePart(uninterpreted_option, part_location));
1002 DO(Consume("="));
1030 DO(ConsumeIdentifier(&value, "Expected identifier."));
1039 DO(ConsumeInteger64(max_value, &value, "Expected integer."));
1056 DO(ConsumeNumber(&value, "Expected number."));
1068 DO(ConsumeString(&value, "Expected string."));
1077 DO(ParseUninterpretedBlock(
1088 DO(ConsumeEndOfDeclaration(";", &location));
1097 DO(Consume("extensions"));
1099 do {
1115 DO(ConsumeInteger(&start, "Expected field number range."));
1127 DO(ConsumeInteger(&end, "Expected integer."));
1145 DO(ConsumeEndOfDeclaration(";", &extensions_location));
1154 DO(Consume("extend"));
1159 DO(ParseUserDefinedType(&extendee));
1163 DO(ConsumeEndOfDeclaration("{", &extend_location));
1167 do {
1210 DO(Consume("enum"));
1217 DO(ConsumeIdentifier(enum_type->mutable_name(), "Expected enum name."));
1220 DO(ParseEnumBlock(enum_type, enum_location));
1226 DO(ConsumeEndOfDeclaration("{", &enum_location));
1269 DO(ConsumeIdentifier(enum_value->mutable_name(),
1273 DO(Consume("=", "Missing numeric value for enum constant."));
1283 DO(ConsumeSignedInteger(&number, "Expected integer."));
1287 DO(ParseEnumConstantOptions(enum_value, enum_value_location));
1289 DO(ConsumeEndOfDeclaration(";", &enum_value_location));
1302 DO(Consume("["));
1304 do {
1305 DO(ParseOption(value->mutable_options(), location, OPTION_ASSIGNMENT));
1308 DO(Consume("]"));
1317 DO(Consume("service"));
1324 DO(ConsumeIdentifier(service->mutable_name(), "Expected service name."));
1327 DO(ParseServiceBlock(service, service_location));
1333 DO(ConsumeEndOfDeclaration("{", &service_location));
1369 DO(Consume("rpc"));
1376 DO(ConsumeIdentifier(method->mutable_name(), "Expected method name."));
1380 DO(Consume("("));
1386 DO(ParseUserDefinedType(method->mutable_input_type()));
1388 DO(Consume(")"));
1391 DO(Consume("returns"));
1392 DO(Consume("("));
1398 DO(ParseUserDefinedType(method->mutable_output_type()));
1400 DO(Consume(")"));
1404 DO(ParseOptions(method_location,
1408 DO(ConsumeEndOfDeclaration(";", &method_location));
1470 DO(ParseUserDefinedType(type_name));
1497 DO(ConsumeIdentifier(&identifier, "Expected type name."));
1503 DO(ConsumeIdentifier(&identifier, "Expected identifier."));
1521 DO(Consume("package"));
1530 DO(ConsumeIdentifier(&identifier, "Expected identifier."));
1538 DO(ConsumeEndOfDeclaration(";", &location));
1548 DO(Consume("import"));
1553 DO(Consume("public"));
1559 DO(Consume("weak"));
1566 DO(ConsumeString(dependency->Add(),
1571 DO(ConsumeEndOfDeclaration(";", &location));