Documentation ¶
Overview ¶
Package ast defines the Abstract Syntax Tree for RiveScript.
The tree looks like this (in JSON-style syntax):
{ "Begin": { "Global": {}, // Global vars "Var": {}, // Bot variables "Sub": {}, // Substitution map "Person": {}, // Person substitution map "Array": {}, // Arrays }, "Topics": {}, "Objects": [], }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Begin ¶
type Begin struct { Global map[string]string `json:"global"` Var map[string]string `json:"var"` Sub map[string]string `json:"sub"` Person map[string]string `json:"person"` Array map[string][]string `json:"array"` // Map of string (names) to arrays-of-strings }
Begin represents the "begin block" style data (configuration).
type Object ¶
type Object struct { Name string `json:"name"` Language string `json:"language"` Code []string `json:"code"` }
Object contains source code of dynamically parsed object macros.
type Root ¶
type Root struct { Begin Begin `json:"begin"` Topics map[string]*Topic `json:"topics"` Objects []*Object `json:"objects"` }
Root represents the root of the AST tree.
Click to show internal directories.
Click to hide internal directories.