-
Notifications
You must be signed in to change notification settings - Fork 656
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
[Feature] String Reducers + Canonicalization #945
Labels
feature
A new feature.
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🚀 Feature
The goal is to add
string
to the Phases Reducer, allowing type-inference to handle characters.Depends on #943.
Motivation
Right now, each of the AST and ASG relies on a reducer to handle certain phases such as canonicalization, type inference, etc.
The goal is to update the Reducers allowing for compilation.
Implementation
AST
reduce_string
should be added to thetrait ReconstructingReducer
blockleo/ast/src/reducer/reconstructing_reducer.rs
. It should return an Expression.reduce_value
to return an Expression.reduce_string
should be added to theimpl<R: ReconstructingReducer> ReconstructingDirector<R>
blockleo/ast/src/reducer/reconstructing_director.rs
. The function should return thestring
Value Expression Node wrapped in an Expression Node.reduce_value
function should match thestring
Value Expression Node and callreduce_string
. It should be modified to return an expression.reduce_expression
function should return the expression rather than type wrapping it.reduce_string
should be added to theimpl ReconstructingReducer for Canonicalizer
block.string
AST Node to anArrayInline
Expression Node.Tests
string
.string
is an inline-array.string
to functions.string
fields.string
.The text was updated successfully, but these errors were encountered: