tree-sitter implementation for the confindent configuration language
at main 58 lines 1.1 kB view raw
1{ 2 "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json", 3 "name": "confindent", 4 "rules": { 5 "source_file": { 6 "type": "REPEAT", 7 "content": { 8 "type": "SYMBOL", 9 "name": "definition" 10 } 11 }, 12 "definition": { 13 "type": "SEQ", 14 "members": [ 15 { 16 "type": "SYMBOL", 17 "name": "key" 18 }, 19 { 20 "type": "CHOICE", 21 "members": [ 22 { 23 "type": "SYMBOL", 24 "name": "value" 25 }, 26 { 27 "type": "BLANK" 28 } 29 ] 30 }, 31 { 32 "type": "PATTERN", 33 "value": "\\n" 34 } 35 ] 36 }, 37 "key": { 38 "type": "PATTERN", 39 "value": "[^ \\t]+" 40 }, 41 "value": { 42 "type": "PATTERN", 43 "value": "[^\\n]+" 44 } 45 }, 46 "extras": [ 47 { 48 "type": "PATTERN", 49 "value": "\\s" 50 } 51 ], 52 "conflicts": [], 53 "precedences": [], 54 "externals": [], 55 "inline": [], 56 "supertypes": [], 57 "reserved": {} 58}