Skip to content

Instantly share code, notes, and snippets.

@ionoy
Last active January 3, 2016 10:42
Show Gist options
  • Save ionoy/b2e7f8fcb8b8f7c1b0cb to your computer and use it in GitHub Desktop.
Save ionoy/b2e7f8fcb8b8f7c1b0cb to your computer and use it in GitHub Desktop.
abstract ast NodeMember {
in Parent : Node;
in TemplateScope : Scope;
TemplateScope = TableScope("Templates", null);
}
ast Node : NodeMember {
Members : NodeMember*;
Members.TemplateScope = TemplateScope;
}
declaration TemplateDefinition : NodeMember {
symbol {
Kind = "Template definition";
}
Members : NodeMember*;
ContainingTable = TableScope("", null);
Parent.TemplateScope = Parent.TemplateScope.UnionWith(ContainingTable);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment