refac #2

Merged
pleshevskiy merged 12 commits from refac into main 2023-03-16 13:22:15 +03:00
5 changed files with 258 additions and 258 deletions
Showing only changes of commit cc6fa3e0f7 - Show all commits

View file

@ -1,7 +1,7 @@
module.exports = grammar({
name: "plpgsql",
extras: ($) => [/\s\n/, /\s/, $.comment, $.marginalia],
extras: ($) => [/\s\n/, /\s/, $.line_comment, $.block_comment],
conflicts: ($) => [[$.keyword_char, $.keyword_varchar]],
@ -239,9 +239,9 @@ module.exports = grammar({
// -------
comment: (_) => seq("--", /.*\n/),
line_comment: (_) => seq("--", /.*\n/),
// https://stackoverflow.com/questions/13014947/regex-to-match-a-c-style-multiline-comment
marginalia: (_) => seq("/*", /[^*]*\*+(?:[^/*][^*]*\*+)*/, "/"),
block_comment: (_) => seq("/*", /[^*]*\*+(?:[^/*][^*]*\*+)*/, "/"),
_literal_string: ($) => choice(seq("'", /[^']*/, "'")),
_number: (_) => /\d+/,

View file

@ -1119,7 +1119,7 @@
"type": "PATTERN",
"value": "jsonb|JSONB"
},
"comment": {
"line_comment": {
"type": "SEQ",
"members": [
{
@ -1132,7 +1132,7 @@
}
]
},
"marginalia": {
"block_comment": {
"type": "SEQ",
"members": [
{
@ -1217,11 +1217,11 @@
},
{
"type": "SYMBOL",
"name": "comment"
"name": "line_comment"
},
{
"type": "SYMBOL",
"name": "marginalia"
"name": "block_comment"
}
],
"conflicts": [

View file

@ -1,4 +1,9 @@
[
{
"type": "block_comment",
"named": true,
"fields": {}
},
{
"type": "char",
"named": true,
@ -206,11 +211,6 @@
]
}
},
{
"type": "comment",
"named": true,
"fields": {}
},
{
"type": "create_table",
"named": true,
@ -334,6 +334,11 @@
"named": true,
"fields": {}
},
{
"type": "line_comment",
"named": true,
"fields": {}
},
{
"type": "literal",
"named": true,
@ -357,11 +362,6 @@
]
}
},
{
"type": "marginalia",
"named": true,
"fields": {}
},
{
"type": "numeric",
"named": true,

File diff suppressed because it is too large Load diff

Binary file not shown.