tree-sitter-plpgsql/corpus/create_function/errors.txt
Christian De la Hoz 6303f6c3d8 getting into shape
2021-08-28 12:46:32 +02:00

78 lines
2.4 KiB
Text

================================================================================
wrong - trailing comma (1)
================================================================================
CREATE FUNCTION FOO (foo bar,) RETURNS void AS 'select' LANGUAGE sql;
--------------------------------------------------------------------------------
(source_file
(create_function_statement
(function_signature
(identifier)
(function_parameters
(var_declaration
(identifier)
(identifier))
(ERROR)))
(function_return
(identifier))
(string)
(identifier)))
================================================================================
wrong - trailing comma (2)
================================================================================
CREATE FUNCTION FOO (foo bar, foo bar,) RETURNS void AS 'select' LANGUAGE sql;
--------------------------------------------------------------------------------
(source_file
(create_function_statement
(function_signature
(identifier)
(function_parameters
(var_declaration
(identifier)
(identifier))
(var_declaration
(identifier)
(identifier))
(ERROR)))
(function_return
(identifier))
(string)
(identifier)))
================================================================================
wrong - missing type
================================================================================
CREATE FUNCTION FOO (foo,) RETURNS void AS 'select' LANGUAGE sql;
--------------------------------------------------------------------------------
(source_file
(create_function_statement
(function_signature
(identifier)
(function_parameters
(ERROR
(identifier))))
(function_return
(identifier))
(string)
(identifier)))
================================================================================
wrong - many volatilities
================================================================================
CREATE FUNCTION FOO () RETURNS void AS 'select' LANGUAGE sql STABLE VOLATILE;
--------------------------------------------------------------------------------
(source_file
(create_function_statement
(function_signature
(identifier)
(function_parameters))
(function_return
(identifier))
(string)
(identifier)
(function_volatility))
(ERROR))