MCPcopy Create free account
hub / github.com/OpenSteam001/OpenSteamTool / parseStruct

Method parseStruct

tools/ipc_codegen/ipc_codegen.cpp:266–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

264 }
265
266 StructDecl parseStruct() {
267 StructDecl decl;
268 decl.line = token_.line;
269 decl.name = expect(Tok::Ident, "struct name").text;
270 expect(Tok::LBrace);
271 std::unordered_set<std::string> names;
272 while (token_.kind != Tok::RBrace) {
273 Field field = parseField(false);
274 ensureUnique(names, field.name, "struct field", field.line);
275 expect(Tok::Semi);
276 decl.fields.push_back(std::move(field));
277 }
278 expect(Tok::RBrace);
279 optionalSemi();
280 return decl;
281 }
282
283 ProtocolDecl parseProtocol() {
284 ProtocolDecl decl;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected