Versions in this module Expand all Collapse all v1 v1.4.0 Mar 6, 2023 v1.3.0 Nov 24, 2022 Changes in this version + func Format(f *FileSyntax) []byte + type Allower interface + Allow func(verb string, block bool) bool + type AllowerFunc func(verb string, block bool) bool + func (a AllowerFunc) Allow(verb string, block bool) bool + type Comment struct + Start Position + Suffix bool + Token string + type CommentBlock struct + Start Position + func (x *CommentBlock) Span() (start, end Position) + type Comments struct + After []Comment + Before []Comment + Suffix []Comment + func (c *Comments) Comment() *Comments + type Expr interface + Comment func() *Comments + Span func() (start, end Position) + type FileSyntax struct + Name string + Stmt []Expr + func Parse(file string, data []byte, r Reader, al Allower) (*FileSyntax, error) + func (x *FileSyntax) Span() (start, end Position) + type LParen struct + Pos Position + func (x *LParen) Span() (start, end Position) + type Line struct + End Position + Start Position + Token []string + func (x *Line) Span() (start, end Position) + type LineBlock struct + LParen LParen + Line []*Line + RParen RParen + Start Position + Token []string + func (x *LineBlock) Span() (start, end Position) + type MapConfig map[string][]string + func (mc MapConfig) Allow(verb string, block bool) bool + func (mc MapConfig) Read(errs *bytes.Buffer, fs *FileSyntax, line *Line, verb string, args []string) + type Position struct + Byte int + Line int + LineRune int + type RParen struct + Pos Position + func (x *RParen) Span() (start, end Position) + type Reader interface + Read func(errs *bytes.Buffer, fs *FileSyntax, line *Line, verb string, args []string) + type ReaderFunc func(errs *bytes.Buffer, fs *FileSyntax, line *Line, verb string, args []string) + func (r ReaderFunc) Read(errs *bytes.Buffer, fs *FileSyntax, line *Line, verb string, args []string)