Discover Packages
github.com/error-fyi/fyictl
internal
parser
grammar
package
Version:
v0.1.1
Opens a new window with list of versions in this module.
Published: Oct 15, 2023
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Eval evaluates the source input against the grammar and returns an instance of *sloth.spec
type Grammar struct {
Stmts []*Statement `@@*`
}
Grammar is the participle grammar use to parse the Sloth comment groups in source files
type Scope struct {
Type string `(Fyi @((".error" (".suggestion")? ))?)`
Value string ``
}
Scope defines the statement scope, similar to a code function
GetType returns the type of the statement scope
type Statement struct {
Scope Scope `@@`
Value string `Whitespace* @(String (Whitespace|EOL)*)+`
}
Statement is any comment starting with @sloth keyword
Source Files
¶
Click to show internal directories.
Click to hide internal directories.