Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Misc. cleanup. Pulito and Coere could use the same backend quite easi…

…ly, since pulito's AST fully covers coere's
  • Loading branch information...
commit b705b71972c703058a223df27289aa57009e36b4 1 parent 26b495e
@duckinator authored
Showing with 10 additions and 7 deletions.
  1. +10 −7 design.md
View
17 design.md
@@ -92,25 +92,28 @@ would become
arg1 + arg2.
.
would become
- [:lambda, ['arg1', 'arg2'], [:send, 'add', 'arg1', 'arg2']]
+ [:lambda, [[:argument, "arg1"], [:argument, "arg2"]],
+ [:call, [:variable, "add"], [:variable, "arg1"], [:variable, "arg2"]]]
## Variable definitions ##
variable-name = "value"
would become
- [:define, 'variable-name', "value"]
+ [:define, "variable-name", "value"]
## Function definitions, aka variables defined as lambdas ##
- function-name |arg1 arg2|
+ function-name = |arg1 arg2|
(+ arg1 arg2)
.
would become
- [:define, 'function-name',
- [:lambda, ['arg1', 'arg2'],
- [:send, 'add', 'arg1', 'arg2']]]
+ [:define, "function-name",
+ [:lambda, [[:argument, "arg1"], [:argument, "arg2"]],
+ [:call, [:variable, "add"], [:variable, "arg1"], [:variable, "arg2"]]]]
+and
+
["a" "b" 1 2]
-->
+would become
[:list,
[:string, "a"],
[:string, "b"],
Please sign in to comment.
Something went wrong with that request. Please try again.