private bool IsValidTokenType(CSharpTokenType type) { return(type != CSharpTokenType.WhiteSpace && type != CSharpTokenType.NewLine && type != CSharpTokenType.Comment && type != CSharpTokenType.RazorComment && type != CSharpTokenType.RazorCommentStar && type != CSharpTokenType.RazorCommentTransition && type != CSharpTokenType.Transition); }
internal void TestSingleToken(string text, CSharpTokenType expectedTokenType) { TestTokenizer(text, new CSharpToken(text, expectedTokenType)); }
public static SpanConstructor MetaCode(this SpanFactory self, string content, CSharpTokenType type) { return(self.Span(SpanKindInternal.MetaCode, content, type)); }
public static SpanConstructor CodeTransition(this SpanFactory self, string content, CSharpTokenType type) { return(self.Span(SpanKindInternal.Transition, content, type).Accepts(AcceptedCharactersInternal.None)); }
public SpanConstructor Span(SpanKindInternal kind, string content, CSharpTokenType type) { return(CreateTokenSpan(kind, content, () => new CSharpToken(content, type))); }