DotGet function calls #9

Merged
probablycorey merged 5 commits from dotget-function-calls into main 2025-10-27 19:46:07 +00:00
Owner

This does a few things.

  1. It makes DotGet act more like Identifier where this:

config.path

Is (potentially) a function call. Just like this would be:

config-path

It also works with args, naturally:

io.print Heya

  1. It updates scope detection by adding a do keyword and using that to determine if we're in a FunctionDef scope (fixes a bug)

  2. It allows numbers to be used in DotGet:

$ cat oh.sh
nums = list 1 2 3
echo Index one is nums.1
$ ./bin/shrimp oh.sh
Index one is 2
This does a few things. 1. It makes `DotGet` act more like `Identifier` where this: `config.path` Is (potentially) a function call. Just like this would be: `config-path` It also works with args, naturally: `io.print Heya` 2. It updates scope detection by adding a `do` keyword and using that to determine if we're in a `FunctionDef` scope (fixes a bug) 3. It allows numbers to be used in `DotGet`: ``` $ cat oh.sh nums = list 1 2 3 echo Index one is nums.1 $ ./bin/shrimp oh.sh Index one is 2 ```
defunkt added 1 commit 2025-10-26 23:29:58 +00:00
defunkt added 1 commit 2025-10-27 05:23:52 +00:00
defunkt added 1 commit 2025-10-27 05:32:11 +00:00

Love it

Love it
probablycorey added 2 commits 2025-10-27 19:46:03 +00:00
probablycorey merged commit 71fdafa72d into main 2025-10-27 19:46:07 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 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: probablycorey/shrimp#9
No description provided.