grammar: improve constraint when
This commit is contained in:
parent
4a7b12f806
commit
78fa02efd1
2 changed files with 25 additions and 30 deletions
|
@ -336,10 +336,9 @@ module.exports = grammar({
|
||||||
),
|
),
|
||||||
|
|
||||||
constraint_when: ($) =>
|
constraint_when: ($) =>
|
||||||
choice(
|
seq(
|
||||||
kw("deferrable"),
|
kw("deferrable"),
|
||||||
seq(kw("deferrable"), kw("initially"), kw("immediate")),
|
optional(seq(kw("initially"), choice(kw("immediate"), kw("deferred"))))
|
||||||
seq(kw("deferrable"), kw("initially"), kw("deferred"))
|
|
||||||
),
|
),
|
||||||
|
|
||||||
table_constraint_ty: ($) =>
|
table_constraint_ty: ($) =>
|
||||||
|
|
|
@ -2186,43 +2186,39 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"constraint_when": {
|
"constraint_when": {
|
||||||
"type": "CHOICE",
|
"type": "SEQ",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "PATTERN",
|
"type": "PATTERN",
|
||||||
"value": "[dD][eE][fF][eE][rR][rR][aA][bB][lL][eE]"
|
"value": "[dD][eE][fF][eE][rR][rR][aA][bB][lL][eE]"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "SEQ",
|
"type": "CHOICE",
|
||||||
"members": [
|
"members": [
|
||||||
{
|
{
|
||||||
"type": "PATTERN",
|
"type": "SEQ",
|
||||||
"value": "[dD][eE][fF][eE][rR][rR][aA][bB][lL][eE]"
|
"members": [
|
||||||
|
{
|
||||||
|
"type": "PATTERN",
|
||||||
|
"value": "[iI][nN][iI][tT][iI][aA][lL][lL][yY]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "CHOICE",
|
||||||
|
"members": [
|
||||||
|
{
|
||||||
|
"type": "PATTERN",
|
||||||
|
"value": "[iI][mM][mM][eE][dD][iI][aA][tT][eE]"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "PATTERN",
|
||||||
|
"value": "[dD][eE][fF][eE][rR][rR][eE][dD]"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "PATTERN",
|
"type": "BLANK"
|
||||||
"value": "[iI][nN][iI][tT][iI][aA][lL][lL][yY]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "PATTERN",
|
|
||||||
"value": "[iI][mM][mM][eE][dD][iI][aA][tT][eE]"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "SEQ",
|
|
||||||
"members": [
|
|
||||||
{
|
|
||||||
"type": "PATTERN",
|
|
||||||
"value": "[dD][eE][fF][eE][rR][rR][aA][bB][lL][eE]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "PATTERN",
|
|
||||||
"value": "[iI][nN][iI][tT][iI][aA][lL][lL][yY]"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "PATTERN",
|
|
||||||
"value": "[dD][eE][fF][eE][rR][rR][eE][dD]"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue