Documentation
¶
Overview ¶
Example ¶
p := func(s string) *ast.Parser {
p, _ := ast.New([]byte(s))
return p
}
fmt.Println(Plus(p("5")))
fmt.Println(Plus(p("5 + 2")))
fmt.Println(Plus(p("5 + 2 * 0")))
Output: ["Plus",[["Mult",[["Value","5"]]]]] <nil> ["Plus",[["Mult",[["Value","5"]]],["Mult",[["Value","2"]]]]] <nil> ["Plus",[["Mult",[["Value","5"]]],["Mult",[["Value","2"],["Value","0"]]]]] <nil>
Index ¶
Examples ¶
Constants ¶
View Source
const SP = ' '
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.