package parser
import "github.com/bouncepaw/mycomarkup/parser"
Package parser turns the source text into a sequence of blocks.
Index ¶
- func MakeFormatted(firstLine, hyphaName string) blocks.Formatted
- func MakeHeading(line, hyphaName string, level uint) blocks.Heading
- func Parse(ctx mycocontext.Context, out chan blocks.Block)
- func ParseImgFirstLine(line, hyphaName string) (img blocks.Img, imgFinished bool)
- func ProcessImgLine(img *blocks.Img, line string) (imgFinished bool)
- func ProcessImgRune(img *blocks.Img, r rune) (done bool)
- func ProcessInDescription(img *blocks.Img, r rune) (shouldReturnTrue bool)
- func ProcessInDimensionsH(img *blocks.Img, r rune) (imgFinished bool)
- func ProcessInDimensionsW(img *blocks.Img, r rune) (shouldReturnTrue bool)
- func ProcessInName(img *blocks.Img, r rune) (shouldReturnTrue bool)
- func ProcessInRoot(img *blocks.Img, r rune) (shouldReturnTrue bool)
- func PushImgEntry(img *blocks.Img)
Functions ¶
func MakeFormatted ¶
MakeFormatted parses the formatted text in the input and returns it. Does it?
func MakeHeading ¶
MakeHeading parses the heading on the given line and returns it. Set its level by yourself though.
func Parse ¶
func Parse(ctx mycocontext.Context, out chan blocks.Block)
Parse parses the Mycomarkup document in the given context. All parsed blocks are written to out.
func ParseImgFirstLine ¶
ParseImgFirstLine parses the image gallery on the line and returns it. It also tells if the gallery is finished or not.
func ProcessImgLine ¶
ProcessImgLine parses the line and tells if the gallery is finished.
func ProcessImgRune ¶
ProcessImgRune parses the rune.
func ProcessInDescription ¶
func ProcessInDimensionsH ¶
func ProcessInDimensionsW ¶
func ProcessInName ¶
func ProcessInRoot ¶
func PushImgEntry ¶
PushImgEntry pushes the most recent entry of Img to Img.Entries and creates a new entry. What an ugly function!
Source Files ¶
formatted.go img.go list.go next_token.go parser.go table.go
- Version
- v1.0.4 (latest)
- Published
- Sep 10, 2021
- Platform
- linux/amd64
- Imports
- 12 packages
- Last checked
- 3 days ago –
Tools for package owners.