func addArgsFromTable(concept *parser.Step, conceptName *string, args []string) { for _, arg := range args { concept.Value += " {}" concept.Args = append(concept.Args, &parser.StepArg{Value: arg, ArgType: parser.Dynamic, Name: arg}) *conceptName += fmt.Sprintf(" <%s>", arg) } }
func (self *extractor) handleTable(stepInConcept *parser.Step, step *gauge_messages.Step) { stepInConcept.Value += " {}" specText := self.fileContent + step.GetTable() spec, result := new(parser.SpecParser).Parse(specText, &parser.ConceptDictionary{}) if !result.Ok { self.errors = append(self.errors, result.ParseError) return } stepArgs := []*parser.StepArg{spec.Scenarios[0].Steps[0].Args[0]} self.addTableAsParam(step, stepArgs) stepInConcept.Args = append(stepInConcept.Args, stepArgs[0]) }