/// <summary> /// スタイル設定を開始する /// </summary> private void startStyle() { Debug.WriteLine("KagStyleLexer EndStyled=" + m_sci.EndStyled + " firstStyle=" + m_sci.StyleAt(0)); m_sci.StartStyling(0, 0x1f); int nextChar; char c; while ((nextChar = this.readerRead()) != -1) { c = (char)nextChar; bool isSetStyle = false; switch (c) { case ' ': //空白 break; case '\t': m_lineHeadTabNum++; //タブの数を増やす break; case '\r': //改行 case '\n': handleLineEnd(c); break; case ';': //コメント if (IsKagLineHead(c) == false) { break; //コメントではない } skipToEndOfLine(); //最後に移動 setStyleCh(STYLE_COMMENT); isSetStyle = true; break; case '*': //ラベル if (IsKagLineHead(c) == false) { break; //ラベルではない } Debug.WriteLine("fold level=" + m_sci.GetFoldLevel(m_line)); m_foldingLevel = FOLDING_LABEL; m_sci.SetFoldLevel(m_line, (int)(SC_FOLDLEVELHEADERFLAG + m_foldingLevel)); skipToEndOfLine(); setStyleCh(STYLE_LABEL); isSetStyle = true; break; case '@': //タグ case '[': if (IsKagLineHead(c) == false && c == '@') { break; //'@'の時だけ行頭必須なので処理を飛ばす } startStyleTag(); isSetStyle = true; break; default: break; } if (isSetStyle == false) { setStyleCh(STYLE_DEFAULT); } } }