Add Function Literal Syntax to Ona Script #39

Merged
kayomn merged 5 commits from kym-functions into main 2023-09-02 21:15:28 +02:00
Owner

Adds function literal syntax in the form of lambda block expressions.

let pr = lambda (str):
	@print("This is a func call")
	@print(str)
end

These expressions can then be called by using the invocation syntax:

pr("Hello, world")

Closes #22.

Adds function literal syntax in the form of `lambda` block expressions. ```rb let pr = lambda (str): @print("This is a func call") @print(str) end ``` These expressions can then be called by using the invocation syntax: ```rb pr("Hello, world") ``` Closes #22.
kayomn added this to the (deleted) milestone 2023-08-26 18:13:13 +02:00
kayomn self-assigned this 2023-08-26 18:13:13 +02:00
kayomn added 2 commits 2023-08-26 18:13:13 +02:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
b9f03b34c1
Add argument resolving to functions
kayomn added 1 commit 2023-08-26 22:30:41 +02:00
continuous-integration/drone/pr Build is passing Details
continuous-integration/drone/push Build is passing Details
5c08a1b63e
Add lambda argument arity checking to runtime
kayomn added 1 commit 2023-08-26 22:36:22 +02:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
c071ca82aa
Fix empty strings being parsed incorrectly
kayomn added 1 commit 2023-08-30 21:58:15 +02:00
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details
9eef1074f9
Simply Kym function argument retrieval in VM
kayomn changed title from WIP: Add Function Literal Syntax to Ona Script to Add Function Literal Syntax to Ona Script 2023-09-02 21:14:49 +02:00
kayomn merged commit a0554d0d2e into main 2023-09-02 21:15:28 +02:00
kayomn deleted branch kym-functions 2023-09-02 21:15:34 +02:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: kayomn/ona#39
No description provided.