joshbtn / excelFormulaUtilitiesJS

This library contains methods to beautify an excel formula. This library also contains functions to convert an excel formula to JavaScript (ECMAScript) or C# and python.
http://excelformulabeautifier.com/
Other
394 stars 101 forks source link

getTokens error when finds array of arrays #67

Open mauro-mawesi opened 6 years ago

mauro-mawesi commented 6 years ago

Hello, When I use getTokens() if a formula that contains an array of arrays, apparently it's unable to recognise that is an array of arrays. Example: var tokens = formula.getTokens('VLOOKUP(2,[[2,3,4],[5,6,7]], 2, 0)') [ F_token { value: 'VLOOKUP', type: 'function', subtype: 'start' }, F_token { value: '2', type: 'operand', subtype: 'number' }, F_token { value: ',', type: 'argument', subtype: '' }, F_token { value: '[[2,3,4]', type: 'operand', subtype: 'range' }, F_token { value: ',', type: 'argument', subtype: '' }, F_token { value: '[5,6,7]]', type: 'operand', subtype: 'range' }, F_token { value: ',', type: 'argument', subtype: '' }, F_token { value: '2', type: 'operand', subtype: 'number' }, F_token { value: ',', type: 'argument', subtype: '' }, F_token { value: '0', type: 'operand', subtype: 'number' }, F_token { value: '', type: 'function', subtype: 'stop' } ]