Skip to content
This repository was archived by the owner on Jul 31, 2019. It is now read-only.
This repository was archived by the owner on Jul 31, 2019. It is now read-only.

Fails to parse searches containing square braces #30

@jamwaffles

Description

@jamwaffles

From the searches.csv test set, the following queries fail to parse:

cancer AND stage[titl]
prostate] methylation

With the following error from the first one:

/home/james/Repositories/query-rs/query-parser/node_modules/@repositive/query-parser/dist/parsers/phrase.js:1385
    throw peg$buildStructuredError(
    ^
SyntaxError: Expected end of input but "[" found.
    at peg$buildStructuredError (/home/james/Repositories/query-rs/query-parser/node_modules/@repositive/query-parser/dist/parsers/phrase.js:426:12)
    at peg$parse (/home/james/Repositories/query-rs/query-parser/node_modules/@repositive/query-parser/dist/parsers/phrase.js:1385:11)
    at Object.<anonymous> (/home/james/Repositories/query-rs/query-parser/node_parser.js:7:28)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:266:19)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions