private ParameterSchema ParseProcedure_param(CodeObject decl) { //procedure_param ::= // parameter ["AS"] // data_type [varying_tag] // ["=" param_init_value ] // [output_tag] ; ParameterSchema param = new ParameterSchema(); CodeObject obj = decl.FirstChild(); while (obj != null) { switch (obj.Type) { case "parameter": param.Name = obj.Text; break; case "data_type": case "param_init_value": case "output_tag": break; default: throw new NotImplementedException("Not Implemented Type: " + obj.Type); } obj = obj.NextSibling(); } return(param); }
private void ParseProcedure_param_list(ProcedureSchema prc, CodeObject decl) { // procedure_param_list ::= // {procedure_param, ","} ; CodeObject obj = decl.FirstChild(); while (obj != null) { switch (obj.Type) { case "procedure_param": prc.AddParameter(ParseProcedure_param(obj)); break; default: throw new NotImplementedException("Not Implemented Type: " + obj.Type); } obj = obj.NextSibling(); } }