Skip to content

Commit

Permalink
Merge pull request m-novikov#77 from DerekStride/ds/maria-db-syntaxs
Browse files Browse the repository at this point in the history
MariaDB syntax
  • Loading branch information
DerekStride authored Feb 1, 2023
2 parents 286e10c + b25d304 commit 8d28e17
Show file tree
Hide file tree
Showing 5 changed files with 93,710 additions and 93,010 deletions.
11 changes: 8 additions & 3 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ module.exports = grammar({
keyword_if: _ => make_keyword("if"),
keyword_exists: _ => make_keyword("exists"),
keyword_auto_increment: _ => make_keyword("auto_increment"),
keyword_collate: _ => make_keyword("collate"),
keyword_character: _ => make_keyword("character"),
keyword_engine: _ => make_keyword("engine"),
keyword_default: _ => make_keyword("default"),
keyword_cascade: _ => make_keyword("cascade"),
keyword_with: _ => make_keyword("with"),
Expand Down Expand Up @@ -859,9 +862,11 @@ module.exports = grammar({

table_options: $ => repeat1($.table_option),
table_option: $ => choice(
field('name', alias($.keyword_default, $.identifier)),
seq($.keyword_default, $.keyword_character, $.keyword_set, $.identifier),
seq($.keyword_collate, $.identifier),
field('name', $.keyword_default),
seq(
field('name', $.identifier),
field('name', choice($.keyword_engine, $.identifier)),
'=',
field('value', $.identifier),
),
Expand Down Expand Up @@ -943,7 +948,7 @@ module.exports = grammar({
),

_key_constraint: $ => seq(
$.keyword_key,
choice($.keyword_key, $.keyword_index),
field('name', $.identifier),
$.ordered_columns,
),
Expand Down
82 changes: 71 additions & 11 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 53 additions & 2 deletions src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 8d28e17

Please sign in to comment.