bblfsh / uast-viewer

Apache License 2.0
7 stars 7 forks source link

Refactor UASTViewer to accept raw UAST #73

Closed carlosms closed 5 years ago

carlosms commented 5 years ago

When using withUASTEditor the user only needs to provide the raw UAST, and internally the lib takes care of transforming it to the internal flat UAST, and apply nice defaults for expandRootIds.

The current usage of UASTViewer requires the user to perform the transformation to the internal flat structure, and taking care of the node expansion, otherwise all nodes are collapsed by default.

Ideally UASTViewer should be just as easy as withUASTEditor.

One option already discussed is to rename the current UASTViewer to FlatTreeRenderer, and create a new UASTViewer that performs the same default raw UAST transformation as withUASTEditor.