Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Expression = compiler.Expression{ Detect: func(c *compiler.Compiler) compiler.Type { if Import, ok := Imports[c.Token()]; ok { c.Expecting("(") var Arguments []Type for c.Peek() != ")" { Arguments = append(Arguments, c.ToString(c.ScanExpression())) if c.Peek() != ")" { c.Expecting(",") } } c.Expecting(")") c.Trace() return c.External(c.String(Import.Command)).Call(Arguments...) } return nil }, }
View Source
var Imports = make(map[string]Import)
TODO merge this into Compiler
View Source
var Name = compiler.Translatable{ compiler.English: "import", }
View Source
var Statement = compiler.Statement{ Name: Name, OnScan: func(c *compiler.Compiler) { var Package = c.Scan() Imports[Package] = Import{ Command: Package, } }, Detect: func(c *compiler.Compiler) bool { if Import, ok := Imports[c.Token()]; ok { c.Expecting("(") var Arguments []Type for c.Peek() != ")" { Arguments = append(Arguments, c.ToString(c.ScanExpression())) if c.Peek() != ")" { c.Expecting(",") } } c.Expecting(")") c.Trace() c.External(c.String(Import.Command)).Run(Arguments...) return true } return false }, }
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.