| 360 | } |
| 361 | |
| 362 | Interface parseInterface() { |
| 363 | Interface iface; |
| 364 | iface.line = token_.line; |
| 365 | iface.name = expect(Tok::Ident, "interface name").text; |
| 366 | expect(Tok::LBrace); |
| 367 | std::unordered_set<std::string> methodNames; |
| 368 | while (token_.kind != Tok::RBrace) { |
| 369 | Method method = parseMethod(); |
| 370 | ensureUnique(methodNames, method.name, "method", method.line); |
| 371 | iface.methods.push_back(std::move(method)); |
| 372 | } |
| 373 | expect(Tok::RBrace); |
| 374 | optionalSemi(); |
| 375 | return iface; |
| 376 | } |
| 377 | |
| 378 | Method parseMethod() { |
| 379 | Method method; |
nothing calls this directly
no outgoing calls
no test coverage detected