Skip to content
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.

Commit

Permalink
Allow spaces between a function name and args.
Browse files Browse the repository at this point in the history
  • Loading branch information
nwronski committed Apr 4, 2016
1 parent 6e7bf32 commit 602d276
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
All notable changes to this project will be documented in this file.

## [Unreleased][unreleased]
### Fixed
- Allow spaces between a function name and the argument list
``` sql
SELECT COUNT (*)
FROM hats;
```

## [v0.14.3] - 2016-03-28
### Fixed
Expand Down
2 changes: 1 addition & 1 deletion src/grammar.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ expression_list_rest
{ return e; }

function_call "Function Call"
= n:( name_unquoted ) sym_popen a:( function_call_args )? o sym_pclose
= n:( name_unquoted ) o sym_popen a:( function_call_args )? o sym_pclose
{
return util.extend({
'type': 'function',
Expand Down
2 changes: 1 addition & 1 deletion test/sql/functions/function-mixed-args.sql
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SELECT MYFUNC(col, 1.2, 'str') AS "Super Func"
SELECT MYFUNC (col, 1.2, 'str') AS "Super Func"

0 comments on commit 602d276

Please sign in to comment.