Пример #1
0
 public TextStyle textStyle(SyntaxHighlighterStyle style)
 {
     if (this.type == _HighlightType.number)
     {
         return(style.numberStyle);
     }
     else if (this.type == _HighlightType.comment)
     {
         return(style.commentStyle);
     }
     else if (this.type == _HighlightType.keyword)
     {
         return(style.keywordStyle);
     }
     else if (this.type == _HighlightType._string)
     {
         return(style.stringStyle);
     }
     else if (this.type == _HighlightType.punctuation)
     {
         return(style.punctuationStyle);
     }
     else if (this.type == _HighlightType.klass)
     {
         return(style.classStyle);
     }
     else if (this.type == _HighlightType.constant)
     {
         return(style.constantStyle);
     }
     else
     {
         return(style.baseStyle);
     }
 }
Пример #2
0
 public DartSyntaxHighlighter(SyntaxHighlighterStyle _style = null)
 {
     this._spans = new List <_HighlightSpan> {
     };
     this._style = _style ?? SyntaxHighlighterStyle.lightThemeStyle();
 }