Skip to content
This repository was archived by the owner on Jul 15, 2021. It is now read-only.

Commit fcff8c8

Browse files
committed
Can now omit commas between table constraints.
Table constraints should be separated by commas, but they do not have to be according to SQLite.
1 parent 81bc88a commit fcff8c8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/grammar.pegjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1846,8 +1846,13 @@ source_def_tail
18461846
= sym_comma t:( source_def_column ) o
18471847
{ return t; }
18481848

1849+
/**
1850+
* @note
1851+
* Table constraints should be separated by commas, but they do not have
1852+
* to be according to SQLite.
1853+
*/
18491854
source_tbl_loop
1850-
= sym_comma f:( table_constraint )
1855+
= sym_comma? f:( table_constraint )
18511856
{ return f; }
18521857

18531858
/** {@link https://www.sqlite.org/syntaxdiagrams.html#column-def} */

0 commit comments

Comments
 (0)