strange (incorrect?) whitespace handling
Closed this issue · 1 comments
joelnn commented
> tokenize('=1+3*2')
[
{ value: '1+3', type: 'operand', subtype: 'number' },
{ value: '*', type: 'operator-infix', subtype: 'math' },
{ value: '2', type: 'operand', subtype: 'number' }
]
> tokenize('= 1+3*2')
[
{ value: '1', type: 'operand', subtype: 'number' },
{ value: '+', type: 'operator-infix', subtype: 'math' },
{ value: '3', type: 'operand', subtype: 'number' },
{ value: '*', type: 'operator-infix', subtype: 'math' },
{ value: '2', type: 'operand', subtype: 'number' }
]
> buildTree(tokenize('=1+3*2'))
{
type: 'binary-expression',
operator: '*',
left: { type: 'number', value: NaN },
right: { type: 'number', value: 2 }
}
psalaets commented
There was an issue with scientific notation detection in the tokenizer.
This should be fixed by version 2.3.1 of the excel-formula-tokenizer
project.
Thanks