textml

package module
v0.0.0-...-de5ff62 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2023 License: MIT Imports: 4 Imported by: 0

README

textml

My personal textual markup language. Mostly a more structured alternative to Markdown as I prefer a more extensible language for writing content (and I will never use/setup MDX) (actually Astro is fine).

Introduction

A textml document is composed of various blocks that can also be nested. A block can be a text node or an element node.

This language provides just the syntax and a part from that it can be used to describe various things, for example a markdown-like document can be described as follows

example syntax highlighting of a textml document
Example document from examples/document.tml

Usage

For now there is a small CLI for working with the various "runtimes"

  • textml transpile OPTIONS...

    Used to transpile TextML to other structured formats like json or html.

  • textml template [--output|-o OUTPUT] FILES...

    Used to interpret TextML files as templates, for now the only supported directives are #define{ NAME }{ TEMPLATE }, #{ NAME }, #import{ FILE }, #extends{ NAME }.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDocument

func ParseDocument(r io.RuneReader) (ast.Block, error)

ParseDocument tokenizes the input using lexer and then parses it with parser.ParseDocument

Types

This section is empty.

Directories

Path Synopsis
cmd
runtime

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL