We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
use
Zesterer said that this should work:
enum Head { Single(Ident), Many(Vec<Import>), } struct Import { path: Vec<Ident>, head: Box<Head>, } let import = recursive(|import| { let head = ident.map(Head::Single) .or(import .separated_by(comma) .delimited_by(lbrace, rbrace) .map(Head::Many)); let path = ident.then_ignore(separator).repeated(); path.then(head).map(|(path, head)| Import { path, head }) }); let import_statement = just(use) .ignore_then(import) .then_ignore(semicolon);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Zesterer said that this should work:
The text was updated successfully, but these errors were encountered: