This directory contains examples demonstrating the use of meta-notation.
First, build the project:
npm install
npm run buildThen run the examples:
node dist/examples/basic.jsMeta-notation is a simple, language-agnostic notation system that parses common delimiters found in most programming languages:
- Parentheses:
() - Curly braces:
{} - Square brackets:
[] - Single quotes:
'' - Double quotes:
"" - Backticks:
` `
Unlike more complex notation systems, meta-notation intentionally avoids language-specific features (like the : self-reference in links-notation), making it compatible with a much larger set of programming languages.
- Code Analysis: Parse code structure without full language parsing
- Syntax Highlighting: Quick delimiter matching
- Code Transformation: Preserve structure while modifying content
- Multi-language Tools: Build tools that work across many languages
- Educational: Understand code structure at a basic level
Meta-notation is inspired by:
- links-notation - A more complex notation system with self-references
- metalanguage - An earlier meta programming language concept
The key difference is simplicity and universality. By focusing only on common delimiters and avoiding language-specific syntax, meta-notation can parse code from JavaScript, Python, C++, Java, Go, Rust, and many other languages with the same simple grammar.