Skip to content

Commit

Permalink
parser: fix type tuning regression in temp-table
Browse files Browse the repository at this point in the history
Fixes #79
  • Loading branch information
jkbz64 committed Sep 19, 2024
1 parent dc6fcf6 commit d69830f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ module.exports = grammar({
type_tuning: ($) =>
choice(
seq(kw("AS"), field("type", $._type)),
seq(kw("LIKE"), field("type", $.identifier))
seq(kw("LIKE"), field("type", $._type))
),

_unary_minus_expressions: ($) =>
Expand Down
41 changes: 21 additions & 20 deletions test/corpus/basic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1848,27 +1848,28 @@ DEFINE TEMP-TABLE foo
(field_definition
(identifier)
(type_tuning
(identifier))))
(abl_statement
(identifier)
(identifier)
(identifier)
(identifier)
(qualified_name
(qualified_name
(identifier)
(identifier))))
(field_definition
(identifier)
(identifier))
(identifier)
(string_literal)
(identifier)
(identifier)
(identifier)
(identifier)
(identifier)
(identifier)
(identifier)
(identifier)
(identifier)
(identifier))
(type_tuning
(qualified_name
(identifier)
(identifier)))
(field_option
(string_literal)))
(index_definition
(identifier)
(index_tuning)
(sort_column
(identifier)
(sort_order)))
(index_definition
(identifier)
(sort_column
(identifier)
(sort_order))))
(temp_table_definition
(identifier)
(field_definition
Expand Down

0 comments on commit d69830f

Please sign in to comment.