tree-sitter implementation for the confindent configuration language
1/**
2 * @file tree-sitter implementation for the Confindent configuration language
3 * @author Devon Sawatsky <devon@nove.dev>
4 * @license ISC
5 */
6
7/// <reference types="tree-sitter-cli/dsl" />
8// @ts-check
9
10module.exports = grammar({
11 name: "confindent",
12
13 rules: {
14 // TODO: add external scanner for proper child support (dedents...)
15 source_file: $ => repeat($.definition),
16
17 definition: $ => seq($.key, optional($.value), /\n/),
18
19 key: $ => /[^ \t]+/,
20
21 value: $ => /[^\n]+/,
22 }
23});