コード例 #1
0
 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);
 }
コード例 #2
0
 internal void TestSingleToken(string text, CSharpTokenType expectedTokenType)
 {
     TestTokenizer(text, new CSharpToken(text, expectedTokenType));
 }
コード例 #3
0
 public static SpanConstructor MetaCode(this SpanFactory self, string content, CSharpTokenType type)
 {
     return(self.Span(SpanKindInternal.MetaCode, content, type));
 }
コード例 #4
0
 public static SpanConstructor CodeTransition(this SpanFactory self, string content, CSharpTokenType type)
 {
     return(self.Span(SpanKindInternal.Transition, content, type).Accepts(AcceptedCharactersInternal.None));
 }
コード例 #5
0
 public SpanConstructor Span(SpanKindInternal kind, string content, CSharpTokenType type)
 {
     return(CreateTokenSpan(kind, content, () => new CSharpToken(content, type)));
 }