(opts OptionIndex, sci *sourceCodeInfo, n *ast.ServiceNode, path []int32)
| 588 | } |
| 589 | |
| 590 | func generateSourceCodeInfoForService(opts OptionIndex, sci *sourceCodeInfo, n *ast.ServiceNode, path []int32) { |
| 591 | sci.newBlockLocWithComments(n, n.OpenBrace, path) |
| 592 | sci.newLoc(n.Name, append(path, internal.ServiceNameTag)) |
| 593 | var optIndex, rpcIndex int32 |
| 594 | for _, child := range n.Decls { |
| 595 | switch child := child.(type) { |
| 596 | case *ast.OptionNode: |
| 597 | generateSourceCodeInfoForOption(opts, sci, child, false, &optIndex, append(path, internal.ServiceOptionsTag)) |
| 598 | case *ast.RPCNode: |
| 599 | generateSourceCodeInfoForMethod(opts, sci, child, append(path, internal.ServiceMethodsTag, rpcIndex)) |
| 600 | rpcIndex++ |
| 601 | } |
| 602 | } |
| 603 | } |
| 604 | |
| 605 | func generateSourceCodeInfoForMethod(opts OptionIndex, sci *sourceCodeInfo, n *ast.RPCNode, path []int32) { |
| 606 | if n.OpenBrace != nil { |
no test coverage detected
searching dependent graphs…