Documentation ¶
Overview ¶
Package flex reads tell files that are sectioned into alternating blocks of structured and plain text sections. The plain text sections are wrapped with commands and merged into the structured sections. The plain text sections can also "jump out" into structured sections on lines ending with colons.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadText ¶
func ReadText(runes io.RuneReader) (ret []story.StoryStatement, err error)
consumes all text until eof ( and eats the eof error ) fix: allow line number offset
Types ¶
type PlainText ¶
type PlainText struct {
// contains filtered or unexported fields
}
translate a plain text section to paragraphs of commands containing comments and jess Declare statements.
type Section ¶
type Section struct { StartingLine int // newline count at start of section // contains filtered or unexported fields }
read a structured block until it hits a structured ending.
func MakeSection ¶
return a reader that ends and restarts on every dashed divider in a flex document. must call "NextSection" to start reading.
func (*Section) NextSection ¶
valid at the start of a document or the after ReadRune() has returned eof; otherwise, panics. returns false at the end of a document.
type Unreader ¶
type Unreader interface { io.RuneReader UnreadRune() error }