Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LexerWithSOF ¶ added in v0.17.4
func LexerWithSOF(parent lexer.Definition) lexer.Definition
Types ¶
type File ¶
type File struct {
Statements []*Statement `(@@ | SOF | ANY | ALL | Ident | Space | NewLine | String | MultilineString)*`
}
type FromImport ¶
type FromImport struct { Indented bool `@Space?` Relative []bool `"from" (Space | @".") @"."*` Path []string `@Ident? (Space? "." Space? @Ident)* Space` All bool `"import" Space ( @ALL |` Names []ImportedName `` /* 153-byte string literal not displayed */ }
type Function ¶
type Function struct {
Name string `(NewLine | SOF) ("async" Space)? "def" Space @Ident`
}
type ImportedName ¶
type Statement ¶
type Statement struct { // imports. FromImport *FromImport `@@ |` Import *Import `@@ |` // exports. Class *Class `@@ |` Function *Function `@@ |` VariableTyping *VariableTyping `@@ |` VariableUnpack *VariableUnpack `@@ |` VariableAssign *VariableAssign `@@` }
type VariableAssign ¶
type VariableAssign struct {
Names []string `(NewLine | SOF) (@Ident Space? "=" Space?)+`
}
type VariableTyping ¶
type VariableTyping struct {
Name string `(NewLine | SOF) @Ident Space? ":" Space? Ident`
}
type VariableUnpack ¶
type VariableUnpack struct {
Names []string `` /* 172-byte string literal not displayed */
}
Click to show internal directories.
Click to hide internal directories.