
Hello,
I'm trying to implement an editor for the razor templating engine (mvc). I've been looking at your language transitions sample, and that is very close to what I need. A few questions:
Can I use the CSharp and VBasic add-on languages instead of loading from a langdef file? When I try to do this, I'm not sure how to get the default lexical state and I can't cast these languages' lexers' to DynamicLexer.
Do you have any samples which show how to provide services for child languages (so I can provide intellisense etc. to the child language)?
Do you have any recommended regexs for the Razor syntax?
lexicalScope.StartLexicalPatternGroup = new DynamicLexicalPatternGroup(DynamicLexicalPatternType.Regex, "ASPDirectiveStartDelimiter", serverSideScriptClassificationType);
lexicalScope.StartLexicalPatternGroup.Patterns.Add(new DynamicLexicalPattern(@"@(?!\{)"));
lexicalScope.EndLexicalPatternGroup = new DynamicLexicalPatternGroup(DynamicLexicalPatternType.Regex, "ASPDirectiveStartDelimiter", serverSideScriptClassificationType);
lexicalScope.EndLexicalPatternGroup.Patterns.Add(new DynamicLexicalPattern(@"[\s\r\t\n\w]+(?=[<@])"));
lexicalScope2.StartLexicalPatternGroup = new DynamicLexicalPatternGroup(DynamicLexicalPatternType.Explicit, "ASPDirectiveStartDelimiter", serverSideScriptClassificationType);
lexicalScope2.StartLexicalPatternGroup.Patterns.Add(new DynamicLexicalPattern("@{"));
lexicalScope2.EndLexicalPatternGroup = new DynamicLexicalPatternGroup(DynamicLexicalPatternType.Explicit, "ASPDirectiveEndDelimiter", serverSideScriptClassificationType);
lexicalScope2.EndLexicalPatternGroup.Patterns.Add(new DynamicLexicalPattern("}"));
Thanks!