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
Gleam features a pub modifier for constants, types, functions (internal and external), type definitions, and type aliases. Additionally, it also features an opaque modifier for type definitions and type aliases.
Presently, an construct with a modifier is represented as a different base AST node than the same construct without a modifier. For example:
In the interest of usability, we should move to make constructs with and without a modifier share the same base AST node while the construct with the modifier should have an additional child node for the modifier.
closes#17
This refactor brings this grammar more in line with tree-sitter-rust.
A function or type declaration may have a visibility modifier ("pub") and
type declarations may also have an opacity modifier ("opaque"). This ends
up reducing the number of named rules, which cleans up the queries a bit.
Gleam features a
pub
modifier for constants, types, functions (internal and external), type definitions, and type aliases. Additionally, it also features anopaque
modifier for type definitions and type aliases.Presently, an construct with a modifier is represented as a different base AST node than the same construct without a modifier. For example:
is represented as
and the version with the public modifier:
is represented as
In the interest of usability, we should move to make constructs with and without a modifier share the same base AST node while the construct with the modifier should have an additional child node for the modifier.
e.g.
should be represented as
This behavior also exists in tree-sitter-rust.
The text was updated successfully, but these errors were encountered: