diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-24 10:11:43 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-02-24 11:48:39 +0200 |
commit | a5e53f9ffdde320a7ba104a1e01b3f5ef75d7975 (patch) | |
tree | 49ebc3303916da8298183808630464a4c0ce00d8 /helpcompiler/source | |
parent | 2f9d53df89614955215a630beb0966f0c4a663c2 (diff) |
convert TokenTypes to scoped enum
Change-Id: I17c0a616dd6cf48a22896b6cd6b0df157d1f9a9f
Diffstat (limited to 'helpcompiler/source')
-rw-r--r-- | helpcompiler/source/BasCodeTagger.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/helpcompiler/source/BasCodeTagger.cxx b/helpcompiler/source/BasCodeTagger.cxx index f8b1f95952e5..cad409017db5 100644 --- a/helpcompiler/source/BasCodeTagger.cxx +++ b/helpcompiler/source/BasCodeTagger.cxx @@ -150,7 +150,7 @@ void BasicCodeTagger::tagParagraph( xmlNodePtr paragraph ) { OString sToken(OUStringToOString(strLine.copy(i->nBegin, i->nEnd-i->nBegin), RTL_TEXTENCODING_UTF8)); xmlNodePtr text = xmlNewText(reinterpret_cast<const xmlChar*>(sToken.getStr())); - if ( i->tokenType != TT_WHITESPACE ) + if ( i->tokenType != TokenType::Whitespace ) { xmlChar* typeStr = getTypeString( i->tokenType ); curNode = xmlNewTextChild( paragraph, nullptr, reinterpret_cast<xmlChar const *>("item"), nullptr ); @@ -188,42 +188,42 @@ void BasicCodeTagger::tagBasicCodes() } //! Converts SyntaxHighlighter's TokenTypes enum to a type string for <item type=... > -xmlChar* BasicCodeTagger::getTypeString( TokenTypes tokenType ) +xmlChar* BasicCodeTagger::getTypeString( TokenType tokenType ) { const char* str; switch ( tokenType ) { - case TT_UNKNOWN : + case TokenType::Unknown : str = "unknown"; break; - case TT_IDENTIFIER : + case TokenType::Identifier : str = "identifier"; break; - case TT_WHITESPACE : + case TokenType::Whitespace : str = "whitespace"; break; - case TT_NUMBER : + case TokenType::Number : str = "number"; break; - case TT_STRING : + case TokenType::String : str = "string"; break; - case TT_EOL : + case TokenType::EOL : str = "eol"; break; - case TT_COMMENT : + case TokenType::Comment : str = "comment"; break; - case TT_ERROR : + case TokenType::Error : str = "error"; break; - case TT_OPERATOR : + case TokenType::Operator : str = "operator"; break; - case TT_KEYWORDS : + case TokenType::Keywords : str = "keyword"; break; - case TT_PARAMETER : + case TokenType::Parameter : str = "parameter"; break; default : |