Clean grammar for tree-sitter
Project description
tree-sitter-clean
Clean grammar for tree-sitter.
Description
Clean is a general-purpose, purely functional programming language with uniqueness typing. This grammar supports:
- Module system (
module,import,from...import) - Type system (
::, algebraic data types, records, type classes) - Functions (named, guards,
where/withclauses) - Patterns (variables, constructors, wildcards, lists, tuples)
- Expressions (application, infix operators, let, case, lambda)
- Comprehensions (list comprehensions with generators, guards, let qualifiers)
- Records (construction, update, field access)
Node Types
The grammar produces 69 named node types for precise AST analysis, including:
application— function/constructor call detectionfield_access— record field accesslist_comprehension— withgenerator,guard,let_qualifierrecord_expression/record_update— record manipulationwildcard—_pattern
Usage
Rust
let mut parser = tree_sitter::Parser::new();
parser.set_language(&tree_sitter_clean::LANGUAGE.into())?;
JavaScript
const Parser = require("tree-sitter");
const Clean = require("tree-sitter-clean");
const parser = new Parser();
parser.setLanguage(Clean);
Python
import tree_sitter_clean
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tree_sitter_clean-1.0.0.tar.gz
(59.7 kB
view details)
File details
Details for the file tree_sitter_clean-1.0.0.tar.gz.
File metadata
- Download URL: tree_sitter_clean-1.0.0.tar.gz
- Upload date:
- Size: 59.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86d9522820e2f513a96b4c847b6b41f1bbf34b09a23c55951c37e4908a5d2c05
|
|
| MD5 |
f434897e36202acd4ebff89ebccf7f51
|
|
| BLAKE2b-256 |
29941ab3c890aa099a515547c3fe4bdd8fe6cf4e359f274b9f0b59accb7b613f
|