mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-14 00:14:18 +00:00
Minor C++ tokenising changes.
This commit is contained in:
parent
8772e5716b
commit
90f6353f4f
1 changed files with 12 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue