Add associative map constraints and range refinement

This commit is contained in:
2026-08-14 06:26:15 +09:00
parent 8198b615a8
commit cc6ab40807
52 changed files with 8951 additions and 6918 deletions
+3 -1
View File
@@ -15,7 +15,7 @@ import { parser } from './decodal-parser-jsr.js';
const parserWithMetadata = parser.configure({
props: [
styleTags({
'Let In Match Import Default': t.keyword,
'Let In Match Import Default As': t.keyword,
'True False': t.bool,
Identifier: t.variableName,
String: t.string,
@@ -30,6 +30,7 @@ const parserWithMetadata = parser.configure({
}),
indentNodeProp.add({
Object: delimitedIndent({ closing: '}', align: false }),
MapConstraint: delimitedIndent({ closing: '}', align: false }),
Array: delimitedIndent({ closing: ']', align: false }),
ArrayConstraint: delimitedIndent({ closing: ']', align: false }),
MatchExpression: delimitedIndent({ closing: '}', align: false }),
@@ -37,6 +38,7 @@ const parserWithMetadata = parser.configure({
}),
foldNodeProp.add({
Object: foldDelimited('{', '}'),
MapConstraint: foldDelimited('{', '}'),
Array: foldDelimited('[', ']'),
ArrayConstraint: foldDelimited('[', ']'),
MatchExpression: foldDelimited('{', '}'),