github.com/mithrandie/csvq@v1.18.1/lib/action/syntax.go (about) 1 package action 2 3 import ( 4 "context" 5 6 "github.com/mithrandie/csvq/lib/parser" 7 "github.com/mithrandie/csvq/lib/query" 8 ) 9 10 func Syntax(ctx context.Context, proc *query.Processor, words []string) error { 11 keywords := make([]parser.QueryExpression, 0, len(words)) 12 for _, w := range words { 13 keywords = append(keywords, parser.NewStringValue(w)) 14 } 15 16 statements := []parser.Statement{ 17 parser.Syntax{ 18 Keywords: keywords, 19 }, 20 } 21 22 _, err := proc.Execute(ctx, statements) 23 return err 24 }