Versions in this module Expand all Collapse all v0 v0.4.2 Dec 14, 2023 v0.4.1 Jul 6, 2023 v0.4.0 Apr 13, 2023 Changes in this version + func Parse(text string, filepath string, parserOptions ParserOptions) (*syntax.File, error) + func Print(originalText string, filepath string, syntaxOptions SyntaxOptions) (string, error) + type Comment struct + End Pos + Hash Pos + Pos Pos + Text string + func (v *Comment) UnmarshalEasyJSON(l *jlexer.Lexer) + func (v *Comment) UnmarshalJSON(data []byte) error + func (v Comment) MarshalEasyJSON(w *jwriter.Writer) + func (v Comment) MarshalJSON() ([]byte, error) + type File struct + End Pos + Last []Comment + Name string + Pos Pos + Stmt []Stmt + func MapFile(file syntax.File) File + func (v *File) UnmarshalEasyJSON(l *jlexer.Lexer) + func (v *File) UnmarshalJSON(data []byte) error + func (v File) MarshalEasyJSON(w *jwriter.Writer) + func (v File) MarshalJSON() ([]byte, error) + type Lit struct + End Pos + Pos Pos + Value string + ValueEnd Pos + ValuePos Pos + func (v *Lit) UnmarshalEasyJSON(l *jlexer.Lexer) + func (v *Lit) UnmarshalJSON(data []byte) error + func (v Lit) MarshalEasyJSON(w *jwriter.Writer) + func (v Lit) MarshalJSON() ([]byte, error) + type Node struct + End Pos + Pos Pos + func (v *Node) UnmarshalEasyJSON(l *jlexer.Lexer) + func (v *Node) UnmarshalJSON(data []byte) error + func (v Node) MarshalEasyJSON(w *jwriter.Writer) + func (v Node) MarshalJSON() ([]byte, error) + type ParseError struct + Pos Pos + func MapParseError(err error) (*ParseError, string) + func (v *ParseError) UnmarshalEasyJSON(l *jlexer.Lexer) + func (v *ParseError) UnmarshalJSON(data []byte) error + func (v ParseError) MarshalEasyJSON(w *jwriter.Writer) + func (v ParseError) MarshalJSON() ([]byte, error) + type ParserOptions struct + KeepComments bool + StopAt string + Variant syntax.LangVariant + type Pos struct + Col uint + Line uint + Offset uint + func (v *Pos) UnmarshalEasyJSON(l *jlexer.Lexer) + func (v *Pos) UnmarshalJSON(data []byte) error + func (v Pos) MarshalEasyJSON(w *jwriter.Writer) + func (v Pos) MarshalJSON() ([]byte, error) + type PrinterOptions struct + BinaryNextLine bool + FunctionNextLine bool + Indent uint + KeepPadding bool + Minify bool + SpaceRedirects bool + SwitchCaseIndent bool + type Redirect struct + End Pos + Hdoc *Word + N *Lit + Op string + OpPos Pos + Pos Pos + Word *Word + func (v *Redirect) UnmarshalEasyJSON(l *jlexer.Lexer) + func (v *Redirect) UnmarshalJSON(data []byte) error + func (v Redirect) MarshalEasyJSON(w *jwriter.Writer) + func (v Redirect) MarshalJSON() ([]byte, error) + type Result struct + Message string + Text string + func (v *Result) UnmarshalEasyJSON(l *jlexer.Lexer) + func (v *Result) UnmarshalJSON(data []byte) error + func (v Result) MarshalEasyJSON(w *jwriter.Writer) + func (v Result) MarshalJSON() ([]byte, error) + type Stmt struct + Background bool + Cmd *Node + Comments []Comment + Coprocess bool + End Pos + Negated bool + Pos Pos + Position Pos + Redirs []Redirect + Semicolon Pos + func (v *Stmt) UnmarshalEasyJSON(l *jlexer.Lexer) + func (v *Stmt) UnmarshalJSON(data []byte) error + func (v Stmt) MarshalEasyJSON(w *jwriter.Writer) + func (v Stmt) MarshalJSON() ([]byte, error) + type SyntaxOptions struct + type Word struct + End Pos + Lit string + Parts []Node + Pos Pos + func (v *Word) UnmarshalEasyJSON(l *jlexer.Lexer) + func (v *Word) UnmarshalJSON(data []byte) error + func (v Word) MarshalEasyJSON(w *jwriter.Writer) + func (v Word) MarshalJSON() ([]byte, error)