File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1418,6 +1418,30 @@ func (c *cc) convertWindowSpec(n *pcast.WindowSpec) ast.Node {
14181418 return todo (n )
14191419}
14201420
1421+ func (c * cc ) convertCallStmt (n * pcast.CallStmt ) ast.Node {
1422+ var funcname ast.List
1423+ for _ , s := range []string {n .Procedure .Schema .L , n .Procedure .FnName .L } {
1424+ if s != "" {
1425+ funcname .Items = append (funcname .Items , NewIdentifier (s ))
1426+ }
1427+ }
1428+ var args ast.List
1429+ for _ , a := range n .Procedure .Args {
1430+ args .Items = append (args .Items , c .convert (a ))
1431+ }
1432+ return & ast.CallStmt {
1433+ FuncCall : & ast.FuncCall {
1434+ Func : & ast.FuncName {
1435+ Schema : n .Procedure .Schema .L ,
1436+ Name : n .Procedure .FnName .L ,
1437+ },
1438+ Funcname : & funcname ,
1439+ Args : & args ,
1440+ Location : n .OriginTextPosition (),
1441+ },
1442+ }
1443+ }
1444+
14211445func (c * cc ) convert (node pcast.Node ) ast.Node {
14221446 switch n := node .(type ) {
14231447
@@ -1472,6 +1496,9 @@ func (c *cc) convert(node pcast.Node) ast.Node {
14721496 case * pcast.ByItem :
14731497 return c .convertByItem (n )
14741498
1499+ case * pcast.CallStmt :
1500+ return c .convertCallStmt (n )
1501+
14751502 case * pcast.CaseExpr :
14761503 return c .convertCaseExpr (n )
14771504
You can’t perform that action at this time.
0 commit comments