diff --git a/corpus/plpgsql/block.txt b/corpus/plpgsql/block.txt index 86c3f38..dc176bf 100644 --- a/corpus/plpgsql/block.txt +++ b/corpus/plpgsql/block.txt @@ -147,6 +147,7 @@ DO $$ BEGIN SELECT 1; foo.bar = lower(foo.baz); + foo.bar := lower(foo.baz); RETURN 2; END $$; @@ -165,6 +166,11 @@ $$; (function_call (identifier) (identifier))) + (assign_statement + (identifier) + (function_call + (identifier) + (identifier))) (return_statement (number))) (dollar_quote)))) diff --git a/grammar.js b/grammar.js index 24878df..cf0c447 100644 --- a/grammar.js +++ b/grammar.js @@ -459,7 +459,7 @@ module.exports = grammar({ optional($.execute_using), ), execute_using: $ => seq(kw("using"), commaSep1($._value_expression)), - assign_statement: $ => seq($.identifier, "=", $._value_expression), + assign_statement: $ => seq($.identifier, choice("=", ":="), $._value_expression), return_statement: $ => seq(kw("return"), choice( seq(kw("query"), $.select_statement), seq(kw("query"), $.execute_statement),