Grammar: Allow multiple table keys which are not separated by commas

Fix table definitions like this...
CREATE TABLE [player_tech_branches]
(
	[from_id] INTEGER NOT NULL REFERENCES [techs](id),
	[to_id] INTEGER NOT NULL REFERENCES [techs](id),

	UNIQUE ([from_id], [to_id]) PRIMARY KEY ([from_id], [to_id])
)
...where there are multiple keys which are not separated by commas.

This partially fixed EoD's database in issue #63.
This commit is contained in:
Martin Kleusberg
2014-07-26 21:28:01 +02:00
parent 8d23c77578
commit 2dd0e9516f
4 changed files with 213 additions and 155 deletions

View File

@@ -323,7 +323,8 @@ Table CreateTableWalker::table()
}
s = s->getNextSibling(); //COMMA or RPAREN
s = s->getNextSibling();
if(s->getType() == sqlite3TokenTypes::COMMA || s->getType() == sqlite3TokenTypes::RPAREN)
s = s->getNextSibling();
} else {
// It is