From b4b0e37e7a105b952c3dd3e3dd939e0b7150809d Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Thu, 20 Nov 2014 22:08:16 +0100 Subject: [PATCH] styling fixes --- Scanner.cpp | 22 +++++++++++----------- Scanner.h | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Scanner.cpp b/Scanner.cpp index cddc687a9..934b30dcf 100644 --- a/Scanner.cpp +++ b/Scanner.cpp @@ -104,12 +104,12 @@ int HexValue(char c) void Scanner::reset(CharStream const& _source) { - bool found_doc_comment; + bool foundDocComment; m_source = _source; m_char = m_source.get(); skipWhitespace(); - found_doc_comment = scanToken(); - next(found_doc_comment); + foundDocComment = scanToken(); + next(foundDocComment); } @@ -135,10 +135,10 @@ bool Scanner::scanHexByte(char& o_scannedByte) // Ensure that tokens can be stored in a byte. BOOST_STATIC_ASSERT(Token::NUM_TOKENS <= 0x100); -Token::Value Scanner::next(bool _change_skipped_comment) +Token::Value Scanner::next(bool _changeSkippedComment) { m_current_token = m_next_token; - if (scanToken() || _change_skipped_comment) + if (scanToken() || _changeSkippedComment) m_skipped_comment = m_next_skipped_comment; return m_current_token.token; } @@ -173,7 +173,7 @@ Token::Value Scanner::skipSingleLineComment() return Token::WHITESPACE; } -// For the moment this function simply consumes a single line triple slash doc comment +/// For the moment this function simply consumes a single line triple slash doc comment Token::Value Scanner::scanDocumentationComment() { LiteralScope literal(this); @@ -213,7 +213,7 @@ Token::Value Scanner::skipMultiLineComment() bool Scanner::scanToken() { - bool found_doc_comment = false; + bool foundDocComment = false; m_next_token.literal.clear(); Token::Value token; do @@ -326,7 +326,7 @@ bool Scanner::scanToken() m_next_skipped_comment.location.end = getSourcePos(); m_next_skipped_comment.token = comment; token = Token::WHITESPACE; - found_doc_comment = true; + foundDocComment = true; } else token = skipSingleLineComment(); @@ -423,7 +423,7 @@ bool Scanner::scanToken() m_next_token.location.end = getSourcePos(); m_next_token.token = token; - return found_doc_comment; + return foundDocComment; } bool Scanner::scanEscape() @@ -567,9 +567,9 @@ Token::Value Scanner::scanNumber(char _charSeen) // ---------------------------------------------------------------------------- // Keyword Matcher -#define KEYWORDS(KEYWORD_GROUP, KEYWORD) \ +#define KEYWORDS(KEYWORD_GROUP, KEYWORD) \ KEYWORD_GROUP('a') \ - KEYWORD("address", Token::ADDRESS) \ + KEYWORD("address", Token::ADDRESS) \ KEYWORD_GROUP('b') \ KEYWORD("break", Token::BREAK) \ KEYWORD("bool", Token::BOOL) \ diff --git a/Scanner.h b/Scanner.h index 23007fe12..0a6778ecd 100644 --- a/Scanner.h +++ b/Scanner.h @@ -119,7 +119,7 @@ public: /// Returns the next token and advances input. If called from reset() /// and ScanToken() found a documentation token then next should be called /// with _change_skipped_comment=true - Token::Value next(bool _change_skipped_comment = false); + Token::Value next(bool _changeSkippedComment = false); ///@{ ///@name Information about the current token @@ -157,7 +157,7 @@ public: ///@} private: - // Used for the current and look-ahead token and comments + /// Used for the current and look-ahead token and comments struct TokenDesc { Token::Value token;