Skip to content

Commit

Permalink
Resolved the schema config
Browse files Browse the repository at this point in the history
  • Loading branch information
Vishalk91-4 committed Aug 20, 2024
1 parent 2aa8074 commit f062bcb
Show file tree
Hide file tree
Showing 5 changed files with 164,719 additions and 159,818 deletions.
6 changes: 5 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -876,10 +876,14 @@ module.exports = grammar({
field('attribute', $.identifier),
)),

optional_attribute_declaration: $ => prec(2, seq(
optional_attribute_declaration: $ => prec.right(12, seq(
field('attribute', $.identifier),
'?:',
field('type', $.type),
optional(seq(
'=',
field('default', $.expression)
))
)),

optional_item: $ => prec(PREC.call, seq(
Expand Down
29 changes: 27 additions & 2 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -3542,8 +3542,8 @@
}
},
"optional_attribute_declaration": {
"type": "PREC",
"value": 2,
"type": "PREC_RIGHT",
"value": 12,
"content": {
"type": "SEQ",
"members": [
Expand All @@ -3566,6 +3566,31 @@
"type": "SYMBOL",
"name": "type"
}
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "="
},
{
"type": "FIELD",
"name": "default",
"content": {
"type": "SYMBOL",
"name": "expression"
}
}
]
},
{
"type": "BLANK"
}
]
}
]
}
Expand Down
10 changes: 10 additions & 0 deletions src/node-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -1836,6 +1836,16 @@
}
]
},
"default": {
"multiple": false,
"required": false,
"types": [
{
"type": "expression",
"named": true
}
]
},
"type": {
"multiple": false,
"required": true,
Expand Down
Loading

0 comments on commit f062bcb

Please sign in to comment.