Skip to content

Commit 0226555

Browse files
authored
parser: add validation for create table (#550)
Updated the AST and parsing for create table to be more thorough
1 parent 5164d7b commit 0226555

24 files changed

+2008
-612
lines changed

crates/squawk_linter/src/visitors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ pub(crate) fn check_not_allowed_types(
4242
for stmt in file.stmts() {
4343
match stmt {
4444
ast::Stmt::CreateTable(create_table) => {
45-
if let Some(table_args) = create_table.table_args() {
46-
for arg in table_args.args() {
45+
if let Some(table_arg_list) = create_table.table_arg_list() {
46+
for arg in table_arg_list.args() {
4747
if let ast::TableArg::Column(column) = arg {
4848
check_ty(ctx, column.ty());
4949
}

crates/squawk_parser/src/generated/syntax_kind.rs

Lines changed: 18 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)