Skip to content

Instantly share code, notes, and snippets.

@freedomtowin
Created June 28, 2025 21:17
Show Gist options
  • Save freedomtowin/e928b838ad397fe85afd36953165b5b8 to your computer and use it in GitHub Desktop.
Save freedomtowin/e928b838ad397fe85afd36953165b5b8 to your computer and use it in GitHub Desktop.
Example of creating a Gist using Python
pub struct Comprehension {
pub mapping: Mapping,
pub for_if_clause: ForIfClause,
pub additional_for_if_clauses: Vec<ForIfClause>,
}
impl Parse for Comprehension {
fn parse(input: ParseStream) -> syn::Result<Self> {
Ok(Self {
mapping: input.parse()?,
for_if_clause: input.parse()?,
additional_for_if_clauses: parse_zero_or_more(input),
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment