Documentation ¶
Overview ¶
Package action parses action from text.
A action consists of <%, optional whitespace, a action name, zero or more arguments, optional whitespace and a %>.
A action name consists of a letter followed by zero or more letters, digits, hyphens or colons.
An argument consists of whitespace, an argument name, and an optional argument value specification.
An argument name consists of a letter or _, followed by zero or more letters, digits, _, ., :, or -.
An argument value specification consists of optional whitespace, an optional + charecter, a = character, optional whitespace, and an argument value.
An argument value consists of an unquoted argument value, a single-quoted argument value,or a double-quoted argument value.
An unquoted argument value is a nonempty string of characters not including whitespace, ", ', `, =, or any character in an action delimiter.
A single-quoted argument value consists of ', zero or more characters not including ', and a final '.
A double-quoted argument value consists of ", zero or more characters not including ", and a final ".
Argument values are unescaped using HTML rules.
Index ¶
Constants ¶
const TextAction = "__text__"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action struct { Name string Args map[string]Value Text []byte // set for TextAction // contains filtered or unexported fields }
func (*Action) Location ¶
func (a *Action) Location(lc *LocationContext) string
type LocationContext ¶
type LocationContext struct {
// contains filtered or unexported fields
}