Skip to content

Instantly share code, notes, and snippets.

@ionoy
Created October 20, 2016 10:41
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 ionoy/636597453ece97c98bb57665bf2705fa to your computer and use it in GitHub Desktop.
Save ionoy/636597453ece97c98bb57665bf2705fa to your computer and use it in GitHub Desktop.
map syntax ShowSyntax.Top -> Top {
| WithoutNode -> TopWithoutNode {
Usings -> Usings;
Templates -> Templates;
}
| WithNode -> TopWithNode {
Usings -> Usings;
Node -> TopNode;
Templates -> Templates;
match(NamespaceOpt) { | Some(cl) -> Some(cl.NamespaceKey) | None() -> None() } -> NamespaceKey;
Name = Name(Location, if (Node.NodeNameOpt.HasValue) Node.NodeNameOpt.Value.Key.IdentifierBodyData else "");
Members = TypeMember.AstList(Location);
Attributes = CustomAttributeReference.AstList(Location);
IsPartial = ParsedValue(Node.Key.Span, true);
Node.Key -> TypeBase;
Modifiers = Modifier.AstList(Location, array[Modifier.Public(Location)]);
TypeParameterConstraints = TypeParameterConstraintsClause.AstList(Location);
TypeParameterAliases = TypeParameterAlias.AstList(Location);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment