package
Version:
v0.0.0-...-07e11ac
Opens a new window with list of versions in this module.
Published: Nov 5, 2024
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func NewParser() *participle.Parser[Message]
type Case struct {
Name string `(@Ident | @Case)`
Message *Message `"{" @@ "}"`
}
type Expr struct {
Name string `"{" @Ident`
Func string `("," @Ident)?`
Offset int `("," "offset" ":" @Int)?`
Cases []*Case `(@@*)? "}"`
}
type Fragment struct {
Escaped string `(@Escaped | @SubEscaped)`
Text string `| (@String | @SubMessageString | @Quote | @SubQuote)`
PlainArg *PlainArg `| @@`
Func *Func `| @@`
Expr *Expr `| @@`
Octothorpe bool `| @"#"`
}
type Func struct {
ArgName string `"{" @Ident `
Func string `"," @Ident`
Param string `("," @Ident )? "}"`
}
type Message struct {
Fragments []*Fragment `@@*`
}
type PlainArg struct {
Name string `"{" @Ident "}"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.