bripkens / lucene

Node.js lib to transform: lucene query → syntax tree → lucene query
MIT License
73 stars 33 forks source link

Whitespace after opening parenthesis is breaking parser #21

Closed subk closed 5 years ago

subk commented 5 years ago

Considering this query :

lucene.parse('foo AND ( bar OR baz)');

// Output: SyntaxError 
Line 1, column 11: Expected "!", "&&", "+", "-", "AND NOT", "AND", "NOT", "OR NOT", "OR", "||", or whitespace but "b" found.

Syntax Error is thrown because of the whitespace just after the opening parenthesis

bripkens commented 5 years ago

I'll be releasing this as 2.0.3 once Travis is done.

bripkens commented 5 years ago

Now published as 2.0.3. Thank you for reporting!

subk commented 5 years ago

so fast :+1: Thanks !