[DEBUG] it build
This commit is contained in:
parent
7ea86b08f8
commit
5a0f85a781
@ -263,7 +263,7 @@ void estyle::Lexer::parse() {
|
||||
iii++;
|
||||
getChar(iii, currentChar, nextChar);
|
||||
}
|
||||
enum estyle::lexer::tocken tockenElement = estyle::lexer::INTEGER_32;
|
||||
enum estyle::lexer::tocken tockenElement = estyle::lexer::INTEGER;
|
||||
while ( isNumeric(currentChar)
|
||||
|| ( isHex == true
|
||||
&& isHexadecimal(currentChar) ) ) {
|
||||
@ -273,7 +273,7 @@ void estyle::Lexer::parse() {
|
||||
}
|
||||
if ( isHex == false
|
||||
&& currentChar == '.') {
|
||||
tockenElement = estyle::lexer::FLOAT_64;
|
||||
tockenElement = estyle::lexer::FLOAT;
|
||||
numericData += '.';
|
||||
iii++;
|
||||
getChar(iii, currentChar, nextChar);
|
||||
@ -287,7 +287,7 @@ void estyle::Lexer::parse() {
|
||||
if ( isHex == false
|
||||
&& ( currentChar == 'e'
|
||||
|| currentChar == 'E')) {
|
||||
tockenElement = estyle::lexer::FLOAT_64;
|
||||
tockenElement = estyle::lexer::FLOAT;
|
||||
numericData += currentChar;
|
||||
iii++;
|
||||
getChar(iii, currentChar, nextChar);
|
||||
@ -302,20 +302,6 @@ void estyle::Lexer::parse() {
|
||||
getChar(iii, currentChar, nextChar);
|
||||
}
|
||||
}
|
||||
// Check the real range of the Values and update the internal value with adapted temporary variable
|
||||
if (tockenElement == estyle::lexer::INTEGER_32) {
|
||||
int64_t value = strtol(numericData.c_str(),0,0);
|
||||
if ( value < INT32_MIN
|
||||
|| value > INT32_MAX) {
|
||||
tockenElement = estyle::lexer::INTEGER_64;
|
||||
}
|
||||
} else if (tockenElement == estyle::lexer::FLOAT_64) {
|
||||
double value = strtod(numericData.c_str(),0);
|
||||
double value2 = float(value);
|
||||
if (etk::abs(value - value2) <= double(FLT_EPSILON)) {
|
||||
tockenElement = estyle::lexer::FLOAT_32;
|
||||
}
|
||||
}
|
||||
m_list.pushBack(estyle::LexerElement(tockenElement, tokenStart, iii));
|
||||
iii--;
|
||||
continue;
|
||||
|
@ -72,7 +72,6 @@ etk::String estyle::lexer::toString(estyle::lexer::tocken _token) {
|
||||
case estyle::lexer::RESERVED_BREAK: return "break";
|
||||
case estyle::lexer::RESERVED_CONTINUE: return "continue";
|
||||
case estyle::lexer::RESERVED_RETURN: return "return";
|
||||
case estyle::lexer::RESERVED_VARIABLE: return "variable";
|
||||
case estyle::lexer::RESERVED_NEW: return "new";
|
||||
case estyle::lexer::RESERVED_DELETE: return "delete";
|
||||
case estyle::lexer::RESERVED_PRIVATE: return "private";
|
||||
@ -110,7 +109,7 @@ etk::String estyle::lexer::toString(estyle::lexer::tocken _token) {
|
||||
case estyle::lexer::BASIC_TYPE_FLOAT_96: return "triple";
|
||||
case estyle::lexer::BASIC_TYPE_BOOLEAN: return "bool";
|
||||
case estyle::lexer::BASIC_TYPE_STD_STRING: return "std::string";
|
||||
case estyle::lexer::BASIC_TYPE_NULLPTR: return "std::nullptr";
|
||||
case estyle::lexer::BASIC_TYPE_STD_NULLPTR: return "std::nullptr";
|
||||
case estyle::lexer::BASIC_TYPE_VOID: return "void";
|
||||
}
|
||||
return etk::String("?[") + etk::toString(int32_t(_token)) + "]";
|
||||
|
Loading…
Reference in New Issue
Block a user