package parser

import "github.com/bouncepaw/mycomarkup/parser"

Package parser turns the source text into a sequence of blocks.

Index

Functions

func MakeFormatted

func MakeFormatted(firstLine, hyphaName string) blocks.Formatted

MakeFormatted parses the formatted text in the input and returns it. Does it?

func MakeHeading

func MakeHeading(line, hyphaName string, level uint) blocks.Heading

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

func ParseImgFirstLine(line, hyphaName string) (img blocks.Img, imgFinished bool)

ParseImgFirstLine parses the image gallery on the line and returns it. It also tells if the gallery is finished or not.

func ProcessImgLine

func ProcessImgLine(img *blocks.Img, line string) (imgFinished bool)

ProcessImgLine parses the line and tells if the gallery is finished.

func ProcessImgRune

func ProcessImgRune(img *blocks.Img, r rune) (done bool)

ProcessImgRune parses the rune.

func ProcessInDescription

func ProcessInDescription(img *blocks.Img, r rune) (shouldReturnTrue bool)

func ProcessInDimensionsH

func ProcessInDimensionsH(img *blocks.Img, r rune) (imgFinished bool)

func ProcessInDimensionsW

func ProcessInDimensionsW(img *blocks.Img, r rune) (shouldReturnTrue bool)

func ProcessInName

func ProcessInName(img *blocks.Img, r rune) (shouldReturnTrue bool)

func ProcessInRoot

func ProcessInRoot(img *blocks.Img, r rune) (shouldReturnTrue bool)

func PushImgEntry

func PushImgEntry(img *blocks.Img)

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.