Lines Matching refs:type

32 std::string AppleObjCTypeEncodingParser::ReadStructName(StringLexer &type) {
34 while (type.HasAtLeast(1) && type.Peek() != '=')
35 buffer.Printf("%c", type.Next());
39 std::string AppleObjCTypeEncodingParser::ReadQuotedString(StringLexer &type) {
41 while (type.HasAtLeast(1) && type.Peek() != '"')
42 buffer.Printf("%c", type.Next());
43 StringLexer::Character next = type.Next();
49 uint32_t AppleObjCTypeEncodingParser::ReadNumber(StringLexer &type) {
51 while (type.HasAtLeast(1) && isdigit(type.Peek()))
52 total = 10 * total + (type.Next() - '0');
61 : name(""), type(clang::QualType()), bitfield(0) {}
65 StringLexer &type,
68 if (type.NextIf('"'))
69 retval.name = ReadQuotedString(type);
70 if (!type.NextIf('"'))
73 retval.type = BuildType(ast_ctx, type, for_expression, &bitfield_size);
79 ClangASTContext &ast_ctx, StringLexer &type, bool for_expression) {
80 return BuildAggregate(ast_ctx, type, for_expression, '{', '}',
85 ClangASTContext &ast_ctx, StringLexer &type, bool for_expression) {
86 return BuildAggregate(ast_ctx, type, for_expression, '(', ')',
91 ClangASTContext &ast_ctx, StringLexer &type, bool for_expression,
93 if (!type.NextIf(opener))
95 std::string name(ReadStructName(type));
103 if (!type.NextIf('='))
107 while (in_union && type.HasAtLeast(1)) {
108 if (type.NextIf(closer)) {
112 auto element = ReadStructElement(ast_ctx, type, for_expression);
113 if (element.type.isNull())
138 union_type, element.name.c_str(), ast_ctx.GetType(element.type),
148 ClangASTContext &ast_ctx, StringLexer &type, bool for_expression) {
149 if (!type.NextIf('['))
151 uint32_t size = ReadNumber(type);
152 clang::QualType element_type(BuildType(ast_ctx, type, for_expression));
153 if (!type.NextIf(']'))
163 // consume but ignore the type info and always return an 'id'; if anything,
166 ClangASTContext &clang_ast_ctx, StringLexer &type, bool for_expression) {
167 if (!type.NextIf('@'))
174 if (type.NextIf('"')) {
179 // unquoted except for "}", the end of the type, or another name follows
183 // - @"NSString"@ means "id, followed by a field named NSString of type id"
192 // string is a field name and we push it back onto type.
194 name = ReadQuotedString(type);
196 if (type.HasAtLeast(1)) {
197 switch (type.Peek()) {
200 type.PutBack(name.length() +
251 StringLexer &type, bool for_expression,
253 if (!type.HasAtLeast(1))
258 switch (type.Peek()) {
262 return BuildStruct(clang_ast_ctx, type, for_expression);
264 return BuildArray(clang_ast_ctx, type, for_expression);
266 return BuildUnion(clang_ast_ctx, type, for_expression);
268 return BuildObjCObjectPointerType(clang_ast_ctx, type, for_expression);
271 switch (type.Next()) {
273 type.PutBack(1);
315 uint32_t size = ReadNumber(type);
324 BuildType(clang_ast_ctx, type, for_expression);
333 if (!for_expression && type.NextIf('?')) {
342 BuildType(clang_ast_ctx, type, for_expression);