-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add function call argument parsing. #14
base: main
Are you sure you want to change the base?
Conversation
================================================================================ | ||
Rule, recipe, single line, custom .RECIPEPREFIX I (TODO) | ||
================================================================================ | ||
.RECIPEPREFIX = > | ||
|
||
target: | ||
>echo "foobar" | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
|
||
================================================================================ | ||
Rule, recipe, single line, custom .RECIPEPREFIX II (TODO) | ||
================================================================================ | ||
.RECIPEPREFIX = a | ||
|
||
target: | ||
aecho "foobar" | ||
|
||
-------------------------------------------------------------------------------- | ||
|
||
|
||
================================================================================ | ||
Rule, recipe, single line, custom .RECIPEPREFIX III (TODO) | ||
================================================================================ | ||
.RECIPEPREFIX = > | ||
|
||
target: ; | ||
>echo "foobar" | ||
|
||
-------------------------------------------------------------------------------- | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed these since they are known-failing. This isn't integral to my changes.
i did some work in my fork i added an external scanner for RECIPEPREFIX, so now this works # indent with angles
.RECIPEPREFIX := >
all:
> @echo hello # indent with spaces
.RECIPEPREFIX := $() $()
all:
@echo hello parsing arguments requires more work ... ideally we parse the correct number of arguments for each function ideally we delegate parsing: |
I was doing some work that needs the ability to inspect individual arguments, so I added that to the grammar.
This is my first foray into tree-sitter, so I'll happily take any feedback on the approach. In particular, I appear to have broken something around the
error
,warning
, andinfo
call parsing.