-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix Statement vs Expr #51
Comments
Quoting another comment (that I just left):
I did think about this option of having We could allow uncompilable syntax trees, but I'd rather clearly express the intentions in the structure of the AST, when possible. |
Fixes effectfully#51, effectfully#52 We make the following changes to the AST by adding - a newly introduced a top-level `Program` node, which is parent to - a newly introduced `Statements` node, which is parent to - a `Statement` node, which is chaned to be a parent of - an `Expr` node. In addition we introduce a `EFor` node to the typed AST. We update update the evaluator by providing an explicit transformer stack, `EvalT`, and we fix the semantics for for loops. We also add the following minor improvements - we fix `Sign` vs `Sig` naming issue, - clean up some naming conventions, - provide `stack bench` benchmark for testing generators for the new AST.
Fixes effectfully#51, effectfully#52 We make the following changes to the AST by adding - a newly introduced a top-level `Program` node, which is parent to - a newly introduced `Statements` node, which is parent to - a `Statement` node, which is chaned to be a parent of - an `Expr` node. We make the following changes to Statement by - introduce a `EFor` node to the typed AST. We update update the evaluator by - providing an explicit transformer stack (`EvalT`), - fixing the semantics for for loops, and - switching to CPS both in evaluator and normaliser. We also add minor improvements to the codebase by - fixing `Sign` vs `Sig` naming issue, - cleaning up some naming conventions, and - providing `stack bench` benchmark for testing generators for the new AST.
* [AST] fix statement vs expression Fixes #51, #52 We make the following changes to the AST by adding - a newly introduced a top-level `Program` node, which is parent to - a newly introduced `Statements` node, which is parent to - a `Statement` node, which is chaned to be a parent of - an `Expr` node. We make the following changes to Statement by - introduce a `EFor` node to the typed AST. We update update the evaluator by - providing an explicit transformer stack (`EvalT`), - fixing the semantics for for loops, and - switching to CPS both in evaluator and normaliser. We also add minor improvements to the codebase by - fixing `Sign` vs `Sig` naming issue, - cleaning up some naming conventions, and - providing `stack bench` benchmark for testing generators for the new AST.
In most imperative programming languages statements are the top level forms, with expressions occurring inside statements. At the moment, the language is inside-out, by having statements inside expressions.
We can solve that in two possible ways:
unit
type and treating;
as expression sequencing operator (Add the unit type #44).The text was updated successfully, but these errors were encountered: