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

Implement rule inlining. #55

Open
otac0n opened this issue Oct 4, 2014 · 0 comments
Open

Implement rule inlining. #55

otac0n opened this issue Oct 4, 2014 · 0 comments

Comments

@otac0n
Copy link
Owner

otac0n commented Oct 4, 2014

Some expressions should always be inlined (character classes, literals), others should never be inlined (memoized or lexical rules, any future rule-level feature), and the rest should be considered for inlining depending on the specifics of their internals.

Some situations are fairly ambiguous, for example:

a = b b c c
b = any:. { any.ToUpper() }
c = any:. {{
    /* a whole bunch of code... */
}}

In this case, I would want to write a rule that says, "if the code in the code section contains line breaks, do not inline it." So b, specifically, would be inlieable.

Due to the complex nature of this kind of rule writing, there needs to be a pretty good API for expressing these rules.

Not putting this on a release yet, since it needs to be thought out a bit more.

@otac0n otac0n self-assigned this Oct 4, 2014
@otac0n otac0n removed their assignment Sep 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant