File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1434,6 +1434,30 @@ func (c *cc) convertWindowSpec(n *pcast.WindowSpec) ast.Node {
14341434 return todo (n )
14351435}
14361436
1437+ func (c * cc ) convertCallStmt (n * pcast.CallStmt ) ast.Node {
1438+ var funcname ast.List
1439+ for _ , s := range []string {n .Procedure .Schema .L , n .Procedure .FnName .L } {
1440+ if s != "" {
1441+ funcname .Items = append (funcname .Items , NewIdentifier (s ))
1442+ }
1443+ }
1444+ var args ast.List
1445+ for _ , a := range n .Procedure .Args {
1446+ args .Items = append (args .Items , c .convert (a ))
1447+ }
1448+ return & ast.CallStmt {
1449+ FuncCall : & ast.FuncCall {
1450+ Func : & ast.FuncName {
1451+ Schema : n .Procedure .Schema .L ,
1452+ Name : n .Procedure .FnName .L ,
1453+ },
1454+ Funcname : & funcname ,
1455+ Args : & args ,
1456+ Location : n .OriginTextPosition (),
1457+ },
1458+ }
1459+ }
1460+
14371461func (c * cc ) convert (node pcast.Node ) ast.Node {
14381462 switch n := node .(type ) {
14391463
@@ -1488,6 +1512,9 @@ func (c *cc) convert(node pcast.Node) ast.Node {
14881512 case * pcast.ByItem :
14891513 return c .convertByItem (n )
14901514
1515+ case * pcast.CallStmt :
1516+ return c .convertCallStmt (n )
1517+
14911518 case * pcast.CaseExpr :
14921519 return c .convertCaseExpr (n )
14931520
You can’t perform that action at this time.
0 commit comments