mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-27 16:49:31 +00:00
[language] Add multiple assignments, assignment and definitions are now function calls
This commit is contained in:
parent
760181eaf9
commit
b6473de4d2
36 changed files with 180 additions and 172 deletions
22
ideas.md
22
ideas.md
|
|
@ -27,22 +27,6 @@ Standard library.
|
|||
Default arguments and initial variables values should pass the value check associated with the variable / parameter.
|
||||
Issue: dispatch is decided before evaluating default values.
|
||||
|
||||
---
|
||||
|
||||
Syntax modifications:
|
||||
|
||||
* on the subject of assignments:
|
||||
- multiple assignments:
|
||||
|
||||
:a, :b = 5, 6
|
||||
a, b = list!($(l) l[3], l[6])
|
||||
|
||||
Easy by interpreting the left operand as a List. And also make this work for for loops.
|
||||
|
||||
- regular operator assignments:
|
||||
Could interpret the left operand as a string when it is an identifier, like how _._ works.
|
||||
Would feel good to have less nodes. But because we can doesn't mean we should. Also Assignment is reused in a few other places.
|
||||
|
||||
# Can be done later
|
||||
|
||||
Server API.
|
||||
|
|
@ -55,6 +39,12 @@ Probably wise to look into how other do it. LSP: https://microsoft.github.io/lan
|
|||
|
||||
---
|
||||
|
||||
Return system.
|
||||
|
||||
Could be reused for exception handling or other purposes if accessible by the user.
|
||||
|
||||
---
|
||||
|
||||
Reduce the number of AST node types ; try to merge similar node and make simpler individuals nodes if possible by composing them.
|
||||
Won't help with performance but make me feel better, and easier to extend. Anselme should be more minimal is possible.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue