예제 #1
0
 internal Tokenizer(int line, int startPosition, INpp nppHelper, IntPtr sciPtr, bool isExtended = false)
 {
     _lineNumber     = line;
     _lineText       = new StringBuilder(nppHelper.GetLine(_lineNumber, sciPtr));
     _startPosition  = startPosition;
     _isLineExtended = isExtended;
 }
예제 #2
0
 internal static bool IsLineExtended(int currentLine, INpp nppHelper, IntPtr sciPtr)
 {
     if (currentLine <= 0)
     {
         return(false);
     }
     else
     {
         //get previous line - if Scintilla loses focus we have an endless loop -> stack overflow think of a way to fix this...
         string aline = nppHelper.GetLine(--currentLine, sciPtr);
         if (String.IsNullOrWhiteSpace(aline))
         {
             return(IsLineExtended(currentLine, nppHelper, sciPtr));
         }
         else
         {
             char c = aline.TrimEnd().Last();
             return(c == ',' || c == '[' || c == '\\');
         }
     }
 }