Skip to content

Commit d9b2e1e

Browse files
committed
Explicit doc links to thriftrw/ast types
1 parent daaa9c8 commit d9b2e1e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ast.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ import (
2525

2626
var nodeInterface = reflect.TypeOf((*ast.Node)(nil)).Elem()
2727

28-
// VisitorFunc adapts a function to the ast.Visitor interface. This differs
29-
// from ast.VisitorFunc in that is supports an ast.Visitor-compativle return
28+
// VisitorFunc adapts a function to the [ast.Visitor] interface. This differs
29+
// from [ast.VisitorFunc] in that it supports an ast.Visitor-compatible return
3030
// value.
3131
type VisitorFunc func(ast.Walker, ast.Node) VisitorFunc
3232

@@ -91,7 +91,7 @@ func Resolve(name string, program *ast.Program, dirs []string) (ast.Node, error)
9191
return nil, fmt.Errorf("%q could not be resolved", name)
9292
}
9393

94-
// ResolveConstant resolves an ast.ConstantReference to its target node.
94+
// ResolveConstant resolves an [ast.ConstantReference] to its target node.
9595
//
9696
// The following name formats are supported:
9797
// - "Constant" (ast.Constant)
@@ -123,7 +123,7 @@ func ResolveConstant(ref ast.ConstantReference, program *ast.Program, dirs []str
123123

124124
// ResolveType calls Resolve and goes one step further by attempting to
125125
// resolve the target node's own type. This is useful when the reference
126-
// points to an ast.Typedef or ast.Constant, for example, and the caller
126+
// points to an [ast.Typedef] or [ast.Constant], for example, and the caller
127127
// is primarily intererested in the target's ast.Type.
128128
func ResolveType(ref ast.TypeReference, program *ast.Program, dirs []string) (ast.Node, error) {
129129
n, err := Resolve(ref.Name, program, dirs)

0 commit comments

Comments
 (0)