Skip to content

Commit 46fd328

Browse files
committed
Update conventions
1 parent 0052764 commit 46fd328

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

ast/ast.go

+6-5
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ package ast
3939
//
4040
// Conventions:
4141
//
42-
// - Each node interface (except for Node) should have isXXX method (XXX must be a name of the interface itself).
43-
// - `isXXX` methods should be defined after the interface definition
44-
// and the receiver should be the non-pointer node struct type.
45-
// - Each node struct should have pos and end comments.
46-
// - Each node struct should have template lines in its doc comment.
42+
// - Each node interface (except for Node) must have isXXX method (XXX is a name of the interface itself).
43+
// - `isXXX` methods must be defined after the interface definition
44+
// and the receiver must be the non-pointer node struct type.
45+
// - Each node struct must have pos and end comments.
46+
// - Each node struct must have template lines in its doc comment.
47+
// - The fields of each node must be oredered by the position.
4748

4849
//go:generate go run ../tools/gen-ast-pos/main.go -astfile ast.go -constfile ast_const.go -outfile pos.go
4950

0 commit comments

Comments
 (0)