diff --git a/README.md b/README.md index 1826162a..73d08b5d 100644 --- a/README.md +++ b/README.md @@ -30,68 +30,7 @@

-## Example - -Extract all function declarations with their names and bodies: - -``` -(function_declaration - name: (identifier) @name - body: (statement_block) @body) @fn -``` - -Plotnik infers a typed output structure from your query: - -``` -{ fn: Node, name: Node, body: Node } -``` - -## Features - -- **Recursion** — match nested structures of arbitrary depth -- **Type inference** — output types derived automatically from query structure -- **Named expressions** — define reusable subqueries with `Name = expr` -- **Partial matching** — queries match subtrees, no need to specify every child -- **Sequences** — `{a b c}` for ordered matches with optional adjacency anchors -- **Alternations** — `[a b]` with merge or tagged union output styles -- **Quantifiers** — `?`, `*`, `+` map to optional and array types -- **Field constraints** — `field: expr` and negated `!field` -- **Supertypes** — `(expression/identifier)` for grammar hierarchies - -## Installation - -```sh -cargo install plotnik-cli -``` - -Or build from source: - -```sh -git clone https://github.com/plotnik-lang/plotnik.git -cd plotnik -cargo build --release -``` - -## Usage - -```sh -# Parse and inspect a query -plotnik debug --query-text '(function_declaration) @fn' --query-ast - -# Parse source file and show AST -plotnik debug --source-file example.ts --source-ast - -# Run query against source -plotnik debug --query-text '(identifier) @id' --source-file example.ts --result - -# List supported languages -plotnik langs - -# Show documentation -plotnik docs reference -``` - -## Roadmap +## Roadmap 🚀 **Ignition** _(the parser)_ @@ -120,7 +59,3 @@ plotnik docs reference - [ ] Bindings (TypeScript, Python, Ruby) - [ ] LSP server - [ ] Editor support (VSCode, Zed, Neovim) - -## License - -[MIT](LICENSE.md)