Skip to content

Instantly share code, notes, and snippets.

@kemurphy
Last active December 20, 2015 08:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kemurphy/6098120 to your computer and use it in GitHub Desktop.
Save kemurphy/6098120 to your computer and use it in GitHub Desktop.
// parse an element of a struct definition
fn parse_struct_decl_field(&self) -> @struct_field {
let attrs = self.parse_outer_attributes();
let vis = if self.eat_keyword(keywords::Priv) {
private
} else if self.eat_keyword(keywords::Pub) {
public
} else {
inherited
};
self.parse_single_struct_field(vis, attrs)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment