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

void highlight::CodeGenerator::printMaskedToken ( bool  addMetaInfo = false,
bool  flushWhiteSpace = true,
StringTools::KeywordCase  tcase = StringTools::CASE_UNCHANGED 
) [private]

print escaped token and clears it

Parameters:
addMetaInfo set true if token may have meta information
flushWhiteSpace set true if white space should be flushed
tcase keyword case

Definition at line 540 of file codegenerator.cpp.

References StringTools::change_case(), flushWs(), getMetaInfoCloseTag(), getMetaInfoOpenTag(), maskString(), metaInfo, out, tagsEnabled, and token.

Referenced by processDirectiveState(), processEscapeCharState(), processKeywordState(), processMultiLineCommentState(), processNumberState(), processRootState(), processSingleLineCommentState(), processStringState(), and processSymbolState().

      {
            if ( flushWhiteSpace ) flushWs();

            if ( addMetaInfo && tagsEnabled )
            {
                  bool insertMetaInfo=metaInfo.tagExists ( token );
                  if ( insertMetaInfo ) *out<<getMetaInfoOpenTag ( metaInfo.getTagInfo ( token ) );
                  maskString ( *out, StringTools::change_case ( token, tcase ) );
                  if ( insertMetaInfo ) *out<<getMetaInfoCloseTag();
            }
            else
            {
                  maskString ( *out, StringTools::change_case ( token, tcase ) );
            }
            token.clear();
      }


Generated by  Doxygen 1.6.0   Back to index