Skip to content

Reusing same pattern in a rule #194

@jcubic

Description

@jcubic

Here is an example of grammar that I would like to have:

heredoc = "<<<" marker:[\w]+ "\n" text:[\s\S]+ "\n" marker {
    return text.join('');
}

Right now it doesn't work but It would be nice to be able to use marker later in the rule. So I properly parse:

<<<HELLO
1
2
3
HELLO

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