Wrong error codes
Closed this issue · 9 comments
rmdort commented
Some error codes are wrongs
- Empty arguments - Expected
FormulaError { _error: '#NA!' }
console.log(parser.parse('SUM()', {sheet: 'Sheet 1', row: 1, col: 1}));
Received - Error: Argument type 0 is missing.
- Unknown function - Expected
FormulaError { _error: '#NAME?' }
console.log(parser.parse('SUMABC()', {sheet: 'Sheet 1', row: 1, col: 1}));
Received Error: Function SUMS is not implemented.
LesterLyu commented
I'll look into it.
rmdort commented
Noticed that SUM(*()
does not throw standard formula error
LesterLyu commented
Should be fixed in the new release 👍
rmdort commented
In the new release i get TypeError
for SUM(*()
LesterLyu commented
I cannot reproduce the error:
https://github.com/LesterLyu/fast-formula-parser/blob/master/test/grammar/errors.js#L92
rmdort commented
Oh. It was the dependency parser throwing TypeError.
const depParser = new DepParser()
depParser.parse('SUM(*()', { sheet: 'Sheet1', row: 1, col: 1})
LesterLyu commented
rmdort commented
Great. thanks