Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

@wdprlib/ast

AST types for Wikidot markup.

Installation

bun add @wdprlib/ast

Usage

import type { SyntaxTree, Element } from "@wdprlib/ast";
import { text, paragraph, bold } from "@wdprlib/ast";

// Create AST nodes
const tree: SyntaxTree = {
  elements: [paragraph([bold([text("Hello")]), text(" world")])],
};

Exports

Types: SyntaxTree, Element, ElementName, ContainerType, AttributeMap, LinkType, ListType, Module, etc.

Helpers: text, paragraph, bold, italics, heading, link, list, lineBreak, horizontalRule

Related Packages

License

AGPL-3.0 - See LICENSE