Documentation
¶
Overview ¶
Package parser declares an expression parser with support for macro expansion.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AllMacros = []Macro{ { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, { // contains filtered or unexported fields }, }
AllMacros includes the list of all spec-supported macros.
View Source
var NoMacros = []Macro{}
NoMacros list.
Functions ¶
func Parse ¶
Parse converts a source input a parsed expression. This function calls ParseWithMacros with AllMacros.
func ParseWithMacros ¶
ParseWithMacros converts a source input and macros set to a parsed expression.
Types ¶
type Macro ¶
type Macro struct {
// contains filtered or unexported fields
}
Macro type which declares the function name and arg count expected for the macro, as well as a macro expansion function.
func (*Macro) GetArgCount ¶
GetArgCount returns the number of arguments the macro expects.
func (*Macro) GetIsInstanceStyle ¶
GetIsInstanceStyle returns whether the macro is "instance" (reciever) style.
Click to show internal directories.
Click to hide internal directories.