diff --git a/README.adoc b/README.adoc deleted file mode 100644 index 4f7dd7d..0000000 --- a/README.adoc +++ /dev/null @@ -1,117 +0,0 @@ -= a2ml-deno -:toc: preamble -:icons: font - -== Overview - -**Deno-native parser library for A2ML (Attested Markup Language), written in ReScript.** - -A2ML is a structured markup language with built-in attestation provenance, -directive metadata, and trust-level tracking. This library provides a complete -parser and renderer for A2ML documents, compiled from ReScript to JavaScript -ES modules for use with Deno. - -== Features - -* Parse A2ML documents from strings or files -* Render AST back to A2ML surface syntax (round-trip support) -* Typed AST with variant types for blocks, inlines, directives, and attestations -* Trust-level hierarchy: Unverified, Automated, Reviewed, Verified -* Directive blocks with key-value attributes -* Attestation provenance chain -* Zero dependencies beyond ReScript standard library - -== Quick Start - -[source,bash] ----- -# Build ReScript to JS -deno task build - -# Use in your Deno project -deno add jsr:@hyperpolymath/a2ml ----- - -[source,javascript] ----- -import { parse, render, parseErrorToString } from "@hyperpolymath/a2ml"; - -const result = parse("# Hello World\n\nSome **bold** text.\n"); -// result is Ok(document) or Error(parseError) ----- - -== Module Structure - -[cols="1,3"] -|=== -| Module | Purpose - -| `A2ML.res` -| Main module — re-exports all public API - -| `A2ML_Types.res` -| Core data types: document, block, inline, directive, attestation, trustLevel - -| `A2ML_Parser.res` -| Line-oriented parser: A2ML text to typed AST - -| `A2ML_Renderer.res` -| Renderer: typed AST back to A2ML text -|=== - -== A2ML Syntax Reference - -[source] ----- -# Heading - -Paragraph with **bold**, *italic*, `code`, [link](url), and @ref(id). - -@directive-name(key=val): single line value - -@multi-line: -Content spanning -multiple lines -@end - -!attest -identity: Jonathan D.A. Jewell -role: author -trust-level: verified -timestamp: 2026-03-16T00:00:00Z -!end - -- Bullet list item -- Another item - -> Block quote text - -```rescript -let x = 42 -``` ----- - -== Development - -[source,bash] ----- -deno task build # Compile ReScript -deno task clean # Clean build artifacts -deno task test # Run tests ----- - -== Related Libraries - -* link:https://github.com/hyperpolymath/a2ml-rs[a2ml-rs] — Rust implementation -* link:https://github.com/hyperpolymath/a2ml-haskell[a2ml-haskell] — Haskell implementation -* link:https://github.com/hyperpolymath/a2ml_gleam[a2ml_gleam] — Gleam implementation -* link:https://github.com/hyperpolymath/tree-sitter-a2ml[tree-sitter-a2ml] — Tree-sitter grammar -* link:https://github.com/hyperpolymath/vscode-a2ml[vscode-a2ml] — VS Code extension - -== License - -SPDX-License-Identifier: CC-BY-SA-4.0 - -Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) - -See link:LICENSE[LICENSE] for details. diff --git a/README.md b/README.md index 45dfe9e..5f2e84b 100644 --- a/README.md +++ b/README.md @@ -1,119 +1,119 @@ -[![Sponsor](https://img.shields.io/badge/Sponsor-%E2%9D%A4-pink?logo=github)](https://github.com/sponsors/hyperpolymath) + + +# Overview + +**Deno-native parser library for A2ML (Attested Markup Language), +written in ReScript.** + +A2ML is a structured markup language with built-in attestation +provenance, directive metadata, and trust-level tracking. This library +provides a complete parser and renderer for A2ML documents, compiled +from ReScript to JavaScript ES modules for use with Deno. -= a2ml-deno -:toc: preamble -:icons: font +# Features -== Overview +- Parse A2ML documents from strings or files -**Deno-native parser library for A2ML (Attested Markup Language), written in ReScript.** +- Render AST back to A2ML surface syntax (round-trip support) -A2ML is a structured markup language with built-in attestation provenance, -directive metadata, and trust-level tracking. This library provides a complete -parser and renderer for A2ML documents, compiled from ReScript to JavaScript -ES modules for use with Deno. +- Typed AST with variant types for blocks, inlines, directives, and + attestations -== Features +- Trust-level hierarchy: Unverified, Automated, Reviewed, Verified -* Parse A2ML documents from strings or files -* Render AST back to A2ML surface syntax (round-trip support) -* Typed AST with variant types for blocks, inlines, directives, and attestations -* Trust-level hierarchy: Unverified, Automated, Reviewed, Verified -* Directive blocks with key-value attributes -* Attestation provenance chain -* Zero dependencies beyond ReScript standard library +- Directive blocks with key-value attributes -== Quick Start +- Attestation provenance chain -[source,bash] ----- +- Zero dependencies beyond ReScript standard library + +# Quick Start + +```bash # Build ReScript to JS deno task build # Use in your Deno project deno add jsr:@hyperpolymath/a2ml ----- +``` -[source,javascript] ----- +```javascript import { parse, render, parseErrorToString } from "@hyperpolymath/a2ml"; const result = parse("# Hello World\n\nSome **bold** text.\n"); // result is Ok(document) or Error(parseError) ----- +``` -== Module Structure +# Module Structure -[cols="1,3"] -|=== -| Module | Purpose +| Module | Purpose | +|----|----| +| `A2ML.res` | Main module — re-exports all public API | +| `A2ML_Types.res` | Core data types: document, block, inline, directive, attestation, trustLevel | +| `A2ML_Parser.res` | Line-oriented parser: A2ML text to typed AST | +| `A2ML_Renderer.res` | Renderer: typed AST back to A2ML text | -| `A2ML.res` -| Main module — re-exports all public API +# A2ML Syntax Reference -| `A2ML_Types.res` -| Core data types: document, block, inline, directive, attestation, trustLevel + # Heading -| `A2ML_Parser.res` -| Line-oriented parser: A2ML text to typed AST + Paragraph with **bold**, *italic*, `code`, [link](url), and @ref(id). -| `A2ML_Renderer.res` -| Renderer: typed AST back to A2ML text -|=== + @directive-name(key=val): single line value -== A2ML Syntax Reference + @multi-line: + Content spanning + multiple lines + @end -[source] ----- -# Heading + !attest + identity: Jonathan D.A. Jewell + role: author + trust-level: verified + timestamp: 2026-03-16T00:00:00Z + !end -Paragraph with **bold**, *italic*, `code`, [link](url), and @ref(id). + - Bullet list item + - Another item -@directive-name(key=val): single line value + > Block quote text -@multi-line: -Content spanning -multiple lines -@end + ```rescript + let x = 42 + ``` -!attest -identity: Jonathan D.A. Jewell -role: author -trust-level: verified -timestamp: 2026-03-16T00:00:00Z -!end +# Development -- Bullet list item -- Another item +```bash +deno task build # Compile ReScript +deno task clean # Clean build artifacts +deno task test # Run tests +``` -> Block quote text +# Related Libraries -```rescript -let x = 42 -``` ----- +- [a2ml-rs](https://github.com/hyperpolymath/a2ml-rs) — Rust + implementation -== Development +- [a2ml-haskell](https://github.com/hyperpolymath/a2ml-haskell) — + Haskell implementation -[source,bash] ----- -deno task build # Compile ReScript -deno task clean # Clean build artifacts -deno task test # Run tests ----- +- [a2ml_gleam](https://github.com/hyperpolymath/a2ml_gleam) — Gleam + implementation -== Related Libraries +- [tree-sitter-a2ml](https://github.com/hyperpolymath/tree-sitter-a2ml) + — Tree-sitter grammar -* link:https://github.com/hyperpolymath/a2ml-rs[a2ml-rs] — Rust implementation -* link:https://github.com/hyperpolymath/a2ml-haskell[a2ml-haskell] — Haskell implementation -* link:https://github.com/hyperpolymath/a2ml_gleam[a2ml_gleam] — Gleam implementation -* link:https://github.com/hyperpolymath/tree-sitter-a2ml[tree-sitter-a2ml] — Tree-sitter grammar -* link:https://github.com/hyperpolymath/vscode-a2ml[vscode-a2ml] — VS Code extension +- [vscode-a2ml](https://github.com/hyperpolymath/vscode-a2ml) — VS Code + extension -== License +# License SPDX-License-Identifier: CC-BY-SA-4.0 Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) -See link:LICENSE[LICENSE] for details. +See [LICENSE](LICENSE) for details.