File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -1434,6 +1434,30 @@ func (c *cc) convertWindowSpec(n *pcast.WindowSpec) ast.Node {
1434
1434
return todo (n )
1435
1435
}
1436
1436
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
+
1437
1461
func (c * cc ) convert (node pcast.Node ) ast.Node {
1438
1462
switch n := node .(type ) {
1439
1463
@@ -1488,6 +1512,9 @@ func (c *cc) convert(node pcast.Node) ast.Node {
1488
1512
case * pcast.ByItem :
1489
1513
return c .convertByItem (n )
1490
1514
1515
+ case * pcast.CallStmt :
1516
+ return c .convertCallStmt (n )
1517
+
1491
1518
case * pcast.CaseExpr :
1492
1519
return c .convertCaseExpr (n )
1493
1520
You can’t perform that action at this time.
0 commit comments