Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct {
Text string // represents a single line comment
}
Comment is a comment.
type Object ¶
type Object struct { ast.Object Fields []ObjectField // Oneline prints this field on a single line. Oneline bool }
Object wraps ast.Object and adds the ability to be printed on one line.
type ObjectField ¶
type ObjectField struct { ast.ObjectField // Comment is a comment for the object field. Comment *Comment // Oneline prints this field on a single line. Oneline bool }
ObjectField wraps ast.ObjectField and adds commenting and the ability to be printed on one line.
func CreateField ¶
func CreateField(name string) (*ObjectField, error)
CreateField creates an ObjectField with a name. If the name matches `reFieldStr`, it will create an ObjectField with Kind `ObjectFieldStr`. If not, it will create an identifier and set the ObjectField kind to `ObjectFieldId`.
Click to show internal directories.
Click to hide internal directories.