Logo Search packages:      
Sourcecode: highlight version File versions  Download package

unsigned char highlight::CodeGenerator::getInputChar (  )  [private]

return next character from in stream

Definition at line 405 of file codegenerator.cpp.

References highlight::PreFormatter::getNextLine(), highlight::PreFormatter::hasMoreLines(), highlight::PreFormatter::isEnabled(), line, lineIndex, lineNumber, matchRegex(), preFormatter, readNewLine(), highlight::PreFormatter::setLine(), and StringTools::trimRight().

Referenced by checkSpecialCmd(), and getCurrentState().

      {
            bool eol = lineIndex == line.length();

            if ( eol )
            {
                  bool eof=false;
                  if ( preFormatter.isEnabled() )
                  {
                        if ( !preFormatter.hasMoreLines() )
                        {
                              eof=readNewLine ( line );
                              preFormatter.setLine ( line );
                        }
                        line = preFormatter.getNextLine();
                  }
                  else
                  {
                        eof=readNewLine ( line );
                  }
                  lineIndex=0;
                  ++lineNumber;
                  line=StringTools::trimRight ( line );
                  matchRegex ( line );

                  return ( eof ) ?'\0':'\n';
            }

            return line[lineIndex++];
      }


Generated by  Doxygen 1.6.0   Back to index