Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
func Parse(fn func(rune) error, runescanner io.RuneScanner) error
Parse parses a brace-string literal from a io.RuneScanner.
Parse will call ‘fn’ for each logical character it receives. So — if this is the brace-literal it parses:
`{a b \{ c \} d}`
Then ‘fn’ would be called 11 times, and given these runes:
'a'
' '
'b'
' '
'{'
' '
'c'
' '
'}'
' '
'd'
Note that the beginning '{' and ending '}' of the brace-string literal are not part of this. Also note that the '\' (black-slash) before the '{' and the '}' was not included either.
func ParseToBytes ¶
func ParseToBytes(runescanner io.RuneScanner) ([]byte, error)
ParseToBytes is similar to Parse except it return the brace-string literal as a []byte.
func ParseToString ¶
func ParseToString(runescanner io.RuneScanner) (string, error)
ParseToString is similar to Parse except it return the brace-string literal as a string.
func ParseToWriter ¶
func ParseToWriter(writer io.Writer, runescanner io.RuneScanner) error
ParseToBytes is similar to Parse except it writes the brace-string literal as an io.Writer.
Types ¶
This section is empty.