Skip to content

Are node positions available? #3

Description

@bmewburn

Hello, you've done some nice work here, thanks for your time on this! I wondered if the ast node and attribute positions were available? If not is this something planned or within scope of this parser?

Activity

  1. ichiriac commented on Jan 12, 2018

    @ichiriac
    Member

    Hi @bmewburn,

    The lexer tracks the line, but not the column. Also, the resulting AST node does not provide any informations about location.

    Of course this kind of feature would be a must have in this parser but actually I have no time in order to implement it.

    If I would have to do it, I would start to calculate the column offset on the lexer first, and next I would implement a sort of function builder in order to build nodes.

    This function will track the node start, and return a function. By calling the function later in order to retrieve the node instance, it would also track the node end, so I would provide a start position, and end position.

    If you have time I would really grateful, but anyway, if you don't I think this would be part of a later release.

    Best Regards,
    Ioan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions