grammar: add new attributes

This commit is contained in:
Dmitriy Pleshevskiy 2023-02-16 23:28:34 +03:00
parent 47cb1df7c8
commit 02af3938f1
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215
4 changed files with 51 additions and 1 deletions

View file

@ -188,6 +188,7 @@ module.exports = grammar({
prec( prec(
PREC.ATTRIBUTE_KEY, PREC.ATTRIBUTE_KEY,
choice( choice(
"direction",
"shape", "shape",
"label", "label",
"link", "link",
@ -244,11 +245,16 @@ module.exports = grammar({
"stroke-width", "stroke-width",
"stroke-dash", "stroke-dash",
"border-radius", "border-radius",
"double-border",
"font-size",
"font-color", "font-color",
"shadow", "shadow",
"multiple", "multiple",
"animated", "animated",
"link" "link",
"italic",
"bold",
"underline"
), ),
_text_attr_key: ($) => "near", _text_attr_key: ($) => "near",

View file

@ -769,6 +769,10 @@
"content": { "content": {
"type": "CHOICE", "type": "CHOICE",
"members": [ "members": [
{
"type": "STRING",
"value": "direction"
},
{ {
"type": "STRING", "type": "STRING",
"value": "shape" "value": "shape"
@ -1006,6 +1010,14 @@
"type": "STRING", "type": "STRING",
"value": "border-radius" "value": "border-radius"
}, },
{
"type": "STRING",
"value": "double-border"
},
{
"type": "STRING",
"value": "font-size"
},
{ {
"type": "STRING", "type": "STRING",
"value": "font-color" "value": "font-color"
@ -1025,6 +1037,18 @@
{ {
"type": "STRING", "type": "STRING",
"value": "link" "value": "link"
},
{
"type": "STRING",
"value": "italic"
},
{
"type": "STRING",
"value": "bold"
},
{
"type": "STRING",
"value": "underline"
} }
] ]
}, },

View file

@ -376,6 +376,10 @@
"type": "block_comment", "type": "block_comment",
"named": true "named": true
}, },
{
"type": "bold",
"named": false
},
{ {
"type": "border-radius", "type": "border-radius",
"named": false "named": false
@ -392,6 +396,10 @@
"type": "dot", "type": "dot",
"named": true "named": true
}, },
{
"type": "double-border",
"named": false
},
{ {
"type": "escape_sequence", "type": "escape_sequence",
"named": true "named": true
@ -412,6 +420,10 @@
"type": "font-color", "type": "font-color",
"named": false "named": false
}, },
{
"type": "font-size",
"named": false
},
{ {
"type": "height", "type": "height",
"named": false "named": false
@ -424,6 +436,10 @@
"type": "integer", "type": "integer",
"named": true "named": true
}, },
{
"type": "italic",
"named": false
},
{ {
"type": "label", "type": "label",
"named": false "named": false
@ -492,6 +508,10 @@
"type": "true", "type": "true",
"named": false "named": false
}, },
{
"type": "underline",
"named": false
},
{ {
"type": "width", "type": "width",
"named": false "named": false

Binary file not shown.