nodeLocOf returns the Loc of a node, handling common wrapper types.
(node ast.Node)
| 318 | |
| 319 | // nodeLocOf returns the Loc of a node, handling common wrapper types. |
| 320 | func nodeLocOf(node ast.Node) ast.Loc { |
| 321 | switch n := node.(type) { |
| 322 | case *ast.A_Const: |
| 323 | return n.Loc |
| 324 | default: |
| 325 | return ast.Loc{Start: -1, End: -1} |
| 326 | } |
| 327 | } |
no outgoing calls
no test coverage detected