Skip to content

feature: for-each loops? #5

@nicferrier

Description

@nicferrier

Did you check the tree-sitter docs?

Is your feature request related to a problem? Please describe.

Hare has this new for-each expression:

const arr = [1,2,3];
for (let item .. arr) {
   fmt::println("the item:", item)!;
};

maybe you're already working on it?

otherwise maybe I'll try and learn how tree-sitter grammars work.

Describe the solution you'd like

Support the new syntax in the grammar.

I guess it would be really cool if somehow the grammar could be derived from the grammar in hare?

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions