Skip to content

How to represent sequences that can be joined in any order in a tree-sitter grammar file #2416

Closed Answered by amaanq
meteor-lsw asked this question in Q&A
Discussion options

You must be logged in to vote

you could write out every possible combination, like so:

choice(
  seq(x, y, z),
  seq(z, y, x),
  ..etc
)

Replies: 1 comment 11 replies

Comment options

You must be logged in to vote
11 replies
@meteor-lsw
Comment options

@sogaiu
Comment options

@meteor-lsw
Comment options

@amaanq
Comment options

Answer selected by meteor-lsw
@meteor-lsw
Comment options

@meteor-lsw
Comment options

@meteor-lsw
Comment options

@amaanq
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #2415 on July 20, 2023 15:12.