protected virtual void ParseProto(ParserContext context) { context.ReadKeyword("PROTO"); var proto = new ProtoNode { name = ParseNodeNameId(context) }; context.PushNodeContainer(proto.children); context.PushFieldContainer(proto); ParseInterfaceDeclarations(context); if (context.ReadNextToken().Type != VRML97TokenType.OpenBrace) { throw new InvalidVRMLSyntaxException(); } ParseProtoBody(context); if (context.ReadNextToken().Type != VRML97TokenType.CloseBrace) { throw new InvalidVRMLSyntaxException(); } context.PopFieldContainer(); context.PopNodeContainer(); context.RegisterPtototype(proto); }
protected virtual void ParseProto(ParserContext context) { context.ReadKeyword("PROTO"); var proto = new ProtoNode { name = ParseNodeNameId(context) }; context.PushNodeContainer(proto.children); context.PushFieldContainer(proto); ParseInterfaceDeclarations(context); if (context.ReadNextToken().Type != VRML97TokenType.OpenBrace) { throw new InvalidVRMLSyntaxException(); } ParseProtoBody(context); if (context.ReadNextToken().Type != VRML97TokenType.CloseBrace) { throw new InvalidVRMLSyntaxException(); } context.PopFieldContainer(); context.PopNodeContainer(); context.RegisterPtototype(proto); }