Skip to content
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

Repetion with Seperator Parsing DSL Method #40

Closed
bd82 opened this issue May 6, 2015 · 1 comment
Closed

Repetion with Seperator Parsing DSL Method #40

bd82 opened this issue May 6, 2015 · 1 comment

Comments

@bd82
Copy link
Member

bd82 commented May 6, 2015

this.SUBRULE(this.AssignmentExpression)
                this.MANY(() => {
                    this.CONSUME(Comma)
                    this.SUBRULE2(this.AssignmentExpression)
                })

is a bit verbose.

this.MANY_SEP(() => {
    this.SUBRULE1(this.AssignmentExpression)
}, Comma)

is a bit more succinct.

@bd82 bd82 added the DSL label Jun 11, 2015
@bd82 bd82 closed this as completed in 52c4dbe Aug 15, 2015
@bd82
Copy link
Member Author

bd82 commented Aug 15, 2015

In the final version the separator appears before the action
for example:

this.MANY_SEP(Comma, () => {
    this.SUBRULE1(this.AssignmentExpression)
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant