Hi,
I am trying to implement the example "Merging Two Languages at Run-Time Using a Direct Lexical State Transition ".
The tutorial implementation in my project worked OK but off course without intellisense and the other nice features of the AddOn.
Therefore , i've replaced the dynamic language with the CsharpSyntaxLanguage (from the .NET languages AddOn) :
//DynamicSyntaxLanguage csharp = GetCSharpLanguage()
CSharpSyntaxLanguage csharp = new CSharpSyntaxLanguage();
The following exception ocurrs are the moment of testing (.text property). CSharpSyntaxLanguage is derived from Mergable so i was expecting this to work.
System.InvalidCastException was unhandled
Message="Unable to cast object of type 'ActiproSoftware.SyntaxEditor.Addons.CSharp.CSharpSyntaxLanguage'
to type 'ActiproSoftware.SyntaxEditor.Addons.Dynamic.DynamicSyntaxLanguage'."
Source="ActiproSoftware.SyntaxEditor.Net20"
StackTrace:
at ActiproSoftware.SyntaxEditor.Addons.Dynamic.LexicalPatternGroup.b()
at ActiproSoftware.SyntaxEditor.Addons.Dynamic.LexicalPatternGroup.a(ITextBufferReader A_0, LexicalPattern& A_1)
at ActiproSoftware.SyntaxEditor.Addons.Dynamic.DynamicLexicalScope.IsScopeStart(ITextBufferReader reader, ITokenLexicalParseData& lexicalParseData)
at o.a(Document A_0, TextRange A_1, Int32 A_2, Int32 A_3, ILexicalParseTarget A_4)
at ActiproSoftware.SyntaxEditor.MergableSyntaxLanguage.PerformLexicalParse(Document document, TextRange parseTextRange, ILexicalParseTarget parseTarget)
at ActiproSoftware.SyntaxEditor.Document.a(DocumentModification A_0, Boolean A_1)
at ActiproSoftware.SyntaxEditor.Document.set_Text(String value)
Am i doing something wrong? Did I've overlooked something?
Thanks in advance.
I am trying to implement the example "Merging Two Languages at Run-Time Using a Direct Lexical State Transition ".
The tutorial implementation in my project worked OK but off course without intellisense and the other nice features of the AddOn.
Therefore , i've replaced the dynamic language with the CsharpSyntaxLanguage (from the .NET languages AddOn) :
//DynamicSyntaxLanguage csharp = GetCSharpLanguage()
CSharpSyntaxLanguage csharp = new CSharpSyntaxLanguage();
The following exception ocurrs are the moment of testing (.text property). CSharpSyntaxLanguage is derived from Mergable so i was expecting this to work.
System.InvalidCastException was unhandled
Message="Unable to cast object of type 'ActiproSoftware.SyntaxEditor.Addons.CSharp.CSharpSyntaxLanguage'
to type 'ActiproSoftware.SyntaxEditor.Addons.Dynamic.DynamicSyntaxLanguage'."
Source="ActiproSoftware.SyntaxEditor.Net20"
StackTrace:
at ActiproSoftware.SyntaxEditor.Addons.Dynamic.LexicalPatternGroup.b()
at ActiproSoftware.SyntaxEditor.Addons.Dynamic.LexicalPatternGroup.a(ITextBufferReader A_0, LexicalPattern& A_1)
at ActiproSoftware.SyntaxEditor.Addons.Dynamic.DynamicLexicalScope.IsScopeStart(ITextBufferReader reader, ITokenLexicalParseData& lexicalParseData)
at o.a(Document A_0, TextRange A_1, Int32 A_2, Int32 A_3, ILexicalParseTarget A_4)
at ActiproSoftware.SyntaxEditor.MergableSyntaxLanguage.PerformLexicalParse(Document document, TextRange parseTextRange, ILexicalParseTarget parseTarget)
at ActiproSoftware.SyntaxEditor.Document.a(DocumentModification A_0, Boolean A_1)
at ActiproSoftware.SyntaxEditor.Document.set_Text(String value)
Am i doing something wrong? Did I've overlooked something?
Thanks in advance.