Skip to content

AST inference not working #53

@lucian-poplin

Description

@lucian-poplin

I am trying to parse the following string into an AST: !(type = "identify")

Lexing works correctly...

let str = `!(type = "identify")`
let res = lex(str)

...yet AST fails:

let resAst = ast(res["tokens"])

Error message is: LexerError: Unsupported or unrecognized token: [object Object]

The problem seems to be with the parentheses (no combination of them seems to be accepted) as well as with the prefix negation operator. Rewriting the input as type != "identify" allows correct inference of AST, yet this renders the package unusable.

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