Background:
I'm working on a full-fledged mergable syntax language. So far so good--grammar and AST are working great. Now It must process include files. I'm having trouble piecing together a clear strategy for handling multiple source files from the documentation but I think I'm heading in the right direction. I can't really tell, because...
Question:
I'm having trouble getting the filename/sourcekey (or any access to the SemanticParserServiceRequest) from within MySyntaxLanguage.PerformSemanticParse -- all I get there is a MergableLexicalParserManager. The manager object doesn't seem to have much of the context or the original request.
The ISemanticParserServiceProcessor.Process (in MySyntaxLanguage) looks like this:Which ultimately calls MySyntaxLanguage with a stripped down manager object:
which is where I need the current scope's filename/directory in order to know how to interpret any contained relative paths (in include directives). In a previous post, you mentioned that you use the SourceKey for your C#/VB add ons. My question is, how do you pass it through the static MergableLexicalParserManager.PerformSemanticParse method or otherwise get back to the request's SourceKey? Am I missing something?
Thanks,
Brad
I'm working on a full-fledged mergable syntax language. So far so good--grammar and AST are working great. Now It must process include files. I'm having trouble piecing together a clear strategy for handling multiple source files from the documentation but I think I'm heading in the right direction. I can't really tell, because...
Question:
I'm having trouble getting the filename/sourcekey (or any access to the SemanticParserServiceRequest) from within MySyntaxLanguage.PerformSemanticParse -- all I get there is a MergableLexicalParserManager. The manager object doesn't seem to have much of the context or the original request.
The ISemanticParserServiceProcessor.Process (in MySyntaxLanguage) looks like this:
void ISemanticParserServiceProcessor.Process(SemanticParserServiceRequest request)
{
request.SemanticParseData = MergableLexicalParserManager.PerformSemanticParse( this, request.TextBufferReader, request.Filename ) as ISemanticParseData;
}
protected override object PerformSemanticParse(MergableLexicalParserManager manager)
{
// Blah blah blah...
}
Thanks,
Brad