Emit a separator token if the previous token is a separator, (i.e., we are making an empty statement) or if the previous token was the start of a parenthetical group (i.e., the first parameter is empty).
The use case here is primarily to support third party APIs with optional first parameters. For instance, a =GETDATA(<ids>, <filter>) API could allow a user to leave out the parameter and just apply a filter to the entire dataset. This may look like =GETDATA(,"Country = 'US'")
Steps to Test or Reproduce
Added two new test cases
('=FIRSTPARAMEMPTY(,,1)', 'FIRSTPARAMEMPTY(,,1)'),
As in Excel, we'll treat the first empty param as Falsy.
('A1', '=IF(,FALSE,"PASS")', {}, '<Ranges>(A1)=[[\'PASS\']]'),
Status
READY
Description
Emit a separator token if the previous token is a separator, (i.e., we are making an empty statement) or if the previous token was the start of a parenthetical group (i.e., the first parameter is empty).
The use case here is primarily to support third party APIs with optional first parameters. For instance, a parameter and just apply a filter to the entire dataset. This may look like
=GETDATA(<ids>, <filter>)
API could allow a user to leave out the=GETDATA(,"Country = 'US'")
Steps to Test or Reproduce
Added two new test cases
('=FIRSTPARAMEMPTY(,,1)', 'FIRSTPARAMEMPTY(,,1)'),
As in Excel, we'll treat the first empty param as Falsy.
('A1', '=IF(,FALSE,"PASS")', {}, '<Ranges>(A1)=[[\'PASS\']]'),