feat: Add support for GNU Make #510
No reviewers
Labels
No labels
Compat/Breaking
Kind
Bad merge
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
New language
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: mergiraf/mergiraf#510
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "twz123/mergiraf:add-make"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
(Still figuring out the right tree-sitter queries and examples. If we had support for shell, we could even think about an injection for recipe_line / shell_command. Ugh, what a rabbit hole 😅)
Atomic nodes: recipe_line, shell_command, and raw_text typically hold shell commands or uninterpreted text. Better don't try to merge those.
Commutative parents: Prerequisite lists such as
foo: bar baz
are represented by list or pattern_list nodes. Make does not care about the order of prerequisites, so new prerequisites can be added in different positions without creating real conflicts.Signatues: Variable assignments are uniquely identified by their variable name, and rules are keyed by their target. Prevent duplicating them.
Fixes #491.
5b26c5598e
tocca3b00abe
This looks absolutely fantastic as it stands! :)
Let us know if you need any support for the tree-sitter queries. Beyond the possible language injection, do you need them to add specific commutative parents?
WIP: feat: Add support for GNU Maketo feat: Add support for GNU MakeThanks! I'm removing the WIP because I'm not sure when I'll have time to look at this again. It definitely won't be in the next few weeks, so it's better not to let this linger for too long.
@ -1014,0 +1019,4 @@
language: tree_sitter_make::LANGUAGE.into(),
atomic_nodes: vec!["recipe_line", "shell_command", "raw_text"],
commutative_parents: vec![
CommutativeParent::without_delimiters("list", " "),
I was a bit worried to see that all lists are made commutative, but looking at the grammar, this node type seems to be only used in places where it does make sense.