1
0
mirror of synced 2024-11-28 17:40:51 +01:00

Hopefully fixed macos compile finally

This commit is contained in:
WerWolv 2021-01-07 21:52:03 +01:00
parent 08c802f733
commit e48c61cf27
2 changed files with 5 additions and 4 deletions

View File

@ -4,6 +4,7 @@
#include "helpers/utils.hpp" #include "helpers/utils.hpp"
#include <utility>
#include <string> #include <string>
#include <variant> #include <variant>
@ -193,7 +194,7 @@ namespace hex::lang {
#define KEYWORD_IF COMPONENT(Keyword, If) #define KEYWORD_IF COMPONENT(Keyword, If)
#define KEYWORD_ELSE COMPONENT(Keyword, Else) #define KEYWORD_ELSE COMPONENT(Keyword, Else)
#define INTEGER hex::lang::Token::Type::Integer, hex::lang::Token::IntegerLiteral({ hex::lang::Token::ValueType::Any, 0xFFFF'FFFF'FFFF'FFFF }) #define INTEGER hex::lang::Token::Type::Integer, hex::lang::Token::IntegerLiteral(hex::lang::Token::ValueType::Any, u64(0))
#define IDENTIFIER hex::lang::Token::Type::Identifier, "" #define IDENTIFIER hex::lang::Token::Type::Identifier, ""
#define OPERATOR_AT COMPONENT(Operator, AtDeclaration) #define OPERATOR_AT COMPONENT(Operator, AtDeclaration)

View File

@ -292,7 +292,7 @@ namespace hex::lang {
if (offset >= code.length() || code[offset] != '\'') if (offset >= code.length() || code[offset] != '\'')
throwLexerError("missing terminating ' after character literal", lineNumber); throwLexerError("missing terminating ' after character literal", lineNumber);
tokens.emplace_back(VALUE_TOKEN(Integer, Token::IntegerLiteral({ Token::ValueType::Character, character }) )); tokens.emplace_back(VALUE_TOKEN(Integer, Token::IntegerLiteral(Token::ValueType::Character, character) ));
offset += 1; offset += 1;
} else if (std::isalpha(c)) { } else if (std::isalpha(c)) {
@ -319,9 +319,9 @@ namespace hex::lang {
else if (identifier == "else") else if (identifier == "else")
tokens.emplace_back(TOKEN(Keyword, Else)); tokens.emplace_back(TOKEN(Keyword, Else));
else if (identifier == "false") else if (identifier == "false")
tokens.emplace_back(VALUE_TOKEN(Integer, Token::IntegerLiteral({ Token::ValueType::Unsigned8Bit, u8(0) }))); tokens.emplace_back(VALUE_TOKEN(Integer, Token::IntegerLiteral(Token::ValueType::Unsigned8Bit, u8(0))));
else if (identifier == "true") else if (identifier == "true")
tokens.emplace_back(VALUE_TOKEN(Integer, Token::IntegerLiteral({ Token::ValueType::Unsigned8Bit, u8(1) }))); tokens.emplace_back(VALUE_TOKEN(Integer, Token::IntegerLiteral(Token::ValueType::Unsigned8Bit, u8(1))));
// Check for built-in types // Check for built-in types
else if (identifier == "u8") else if (identifier == "u8")