package
Version:
v0.22.2
Opens a new window with list of versions in this module.
Published: Jun 22, 2024
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type File struct {
Statements []*Statement `(@@ | ANY | ALL | String | Punct | PathSep | Ident)*`
Path string
}
type Mod struct {
Pub bool `@"pub"? ("(" (Ident | PathSep)* ")")? "mod"`
Name Ident `@Ident`
Local bool `@"{"?`
}
type Name struct {
Original Ident `@Ident`
Alias Ident `("as" @Ident)?`
}
type Pub struct {
Name Ident ``
}
type Statement struct {
Mod *Mod `@@`
Use *Use `| @@`
Pub *Pub `| @@`
}
type Use struct {
Pub bool `@"pub"? ("(" (Ident | PathSep)* ")")?`
UsePath *UsePath `"use" @@ ";"`
}
type UsePath struct {
PathSlices []Ident `(@Ident PathSep)*`
All bool `(@ALL |`
Name *Name ` @@ |`
UsePaths []*UsePath ` "{" @@ ("," @@)* "}" )`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.