Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nodes that shouldn't be assigned ID. #2262

Closed
Kesanov opened this issue May 18, 2020 · 0 comments
Closed

Nodes that shouldn't be assigned ID. #2262

Kesanov opened this issue May 18, 2020 · 0 comments

Comments

@Kesanov
Copy link
Contributor

Kesanov commented May 18, 2020

  1. Some of the AST nodes in Rust use type T for fields instead of specific AST like Scala version does.

    As a consequence, scala isn't able to assign IDs to certain fields for certain AST nodes. (Since it uses functor to traverse fields and therefore it skips any field that isn't of type T).

    node field
    InvalidSuffix .elem
    SectionSides, SectionLeft, SectionRight .opr
    MacroMatchSegment .head
    MacroAmbiguousSegment .head and .body
    Import .path
    Mixfix .name
    Def .name

    This will get automatically fixed once we migrate parser to rust. For now it's on the programmer responsibility to use Ast::new and Ast::new_no_id correctly.

  2. Other nodes can have same span as their children, which idmap currently doesn't support. Such nodes also shouldn't be assigned ID explicitly.

    node
    Module
    field of SectionSides
    field of Import
@Kesanov Kesanov changed the title Mismatch between rust and scala AST. Nodes that shouldn't be assigned ID. May 18, 2020
@mwu-tow mwu-tow transferred this issue from enso-org/ide Oct 28, 2021
@wdanilo wdanilo closed this as completed Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants