Add associative map constraints and range refinement
This commit is contained in:
@@ -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('{', '}'),
|
||||
|
||||
Reference in New Issue
Block a user