While building parser assembly, we need to generate types for AST nodes. These type should have some organization making it easy to use them from different CLR languages.
Each syntax is identified by it's QSN (qualified syntax name), which include namespace, module(s) and syntax(es) on the way to syntax.
We have to generate types for Java module, TypeDeclaration and Modifiers syntaxes. Hence, we are talking about mapping QSN to CLR type FQN.
For each name part of QSN except last generate namespace, last name part is type name. E.g. Modifiers type in JetBrains.Languages.Java.TypeDeclaration namespace.
- Simple and easy to compose
- Namespaces will collide with type names, e.g. for TypeDeclaration, and C# doesn't like this.
Namespace maps to namespace, modules and syntaxes are mapped to types, nested within each other
- You can't add "using" for type in C# and user have to specify full nested type name all the time
- Too many types slows down assembly loading
- Name ambiguity problem: