You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered:
Kesanov
changed the title
Mismatch between rust and scala AST.
Nodes that shouldn't be assigned ID.
May 18, 2020
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
).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
andAst::new_no_id
correctly.Other nodes can have same span as their children, which idmap currently doesn't support. Such nodes also shouldn't be assigned ID explicitly.
Module
SectionSides
Import
The text was updated successfully, but these errors were encountered: