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

Add ability to format combinator parsers #43

Open
tomlanning opened this issue Jan 11, 2012 · 0 comments
Open

Add ability to format combinator parsers #43

tomlanning opened this issue Jan 11, 2012 · 0 comments

Comments

@tomlanning
Copy link

The formatting provided by (Align single-line case statements) is useful, thank-you. It would be nice to have similar formatting for single line combinator parsers (e.g., align the trailing transform definition " ... ^^ { ... }").

For example,

def rule1 = rep(rule2) ^^ { _.mkString }
def rule2 = '0' | '1' | '2' | '3' | '4' ^^ { _.toSomething }

could become,

def rule1 = rep(rule2)                   ^^ { _.mkString }
def rule2 = '0' | '1' | '2' | '3' | '4'  ^^ { _.toSomething }

Might be possible to make this more general and align selected operators in adjacent lines.

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

2 participants