Hi there,
my Editor should hande two file-types.
The one with the extension .os declares a namespace like this:
using Main.C;
using Main.B;
using Main2.*;
#include "relativePath/morepath/anoNasp.osi"
namespace Main {
B newFunctionDeclaration(C parameter) {
... Statements ...
parameter = otherFunctionDeclaration(this);
... Statements ...
}
}
The imported namespaces have the same form.
The UsingImport rule look in the grammar:
UsingImport : 'using' importedNamespace=QualifiedNameWithWildCard ';';
The Include rule:
Include : '#include' importURI=STRING;
The included files have the file extension osi and only can declare anonymous namespaces like this:
namespace {
C otherFunctionDeclaration(Main parameter) {
... Statements ...
}
}
My workflow contains the following lines:
// scoping and exporting API
fragment = scoping.ImportURIScopingFragment {}
// fragment = exporting.SimpleNamesFragment {}
fragment = scoping.ImportNamespacesScopingFragment {}
fragment = exporting.QualifiedNamesFragment {}
My question is: Which ScopeProviders I have to use to make this work?
How can I combine the two ImportUriGlobalScope and ImportedNamespaceAwareLocalScope?
Which Providers (e.g. NameProviders) I also have to individualize?
I've also written an ImportUriResolver, so the included recources can be found.
But if I call any Scope in my own OSScopeProvider or OSLinkingService, they are very empty. Why?
I know, anything should work out-of-the-box, but I don't know the right key for the box