grammar: rename comment blocks
This commit is contained in:
parent
8a50f066ab
commit
cc6fa3e0f7
5 changed files with 258 additions and 258 deletions
|
@ -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+/,
|
||||
|
|
|
@ -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": [
|
||||
|
|
|
@ -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,
|
||||
|
|
482
src/parser.c
482
src/parser.c
File diff suppressed because it is too large
Load diff
Binary file not shown.
Loading…
Reference in a new issue