Browse Source

Minor C++ tokenising changes.

tags/2021-05-28
jules 13 years ago
parent
commit
90f6353f4f
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      modules/juce_gui_extra/code_editor/juce_CPlusPlusCodeTokeniserFunctions.h

+ 12
- 0
modules/juce_gui_extra/code_editor/juce_CPlusPlusCodeTokeniserFunctions.h View File

@@ -146,6 +146,9 @@ struct CppTokeniserFunctions
template<class Iterator>
static bool parseHexLiteral (Iterator& source) noexcept
{
if (source.peekNextChar() == '-')
source.skip();
if (source.nextChar() != '0')
return false;
@@ -174,6 +177,9 @@ struct CppTokeniserFunctions
template<class Iterator>
static bool parseOctalLiteral (Iterator& source) noexcept
{
if (source.peekNextChar() == '-')
source.skip();
if (source.nextChar() != '0')
return false;
@@ -194,6 +200,9 @@ struct CppTokeniserFunctions
template<class Iterator>
static bool parseDecimalLiteral (Iterator& source) noexcept
{
if (source.peekNextChar() == '-')
source.skip();
int numChars = 0;
while (isDecimalDigit (source.peekNextChar()))
{
@@ -210,6 +219,9 @@ struct CppTokeniserFunctions
template<class Iterator>
static bool parseFloatLiteral (Iterator& source) noexcept
{
if (source.peekNextChar() == '-')
source.skip();
int numDigits = 0;
while (isDecimalDigit (source.peekNextChar()))


Loading…
Cancel
Save