1
2
3
4
5
6 #ifndef TOKEN_VALUE_PARSERS_HPP
7 #define TOKEN_VALUE_PARSERS_HPP
8 #include <sngcm/cmlexer/CmajorLexerApi.hpp>
9 #include <soulng/lexer/Token.hpp>
10 #include <string>
11 #include <stdint.h>
12
13 using namespace soulng::lexer;
14
15 const int noPrefix = 0;
16 const int utf16Prefix = 1;
17 const int utf32Prefix = 2;
18
19 void ParseFloatingLiteral(const std::string& fileName, const Token& token, double& floatingLit, bool& floatingLitFloat);
20 void ParseIntegerLiteral(const std::string& fileName, const Token& token, uint64_t& intLit, bool& intLitUnsigned);
21 void ParseCharacterLiteral(const std::string& fileName, const Token& token, char32_t& charLit, int& charLitPrefix);
22 void ParseStringLiteral(const std::string& fileName, const Token& token, std::u32string& stringLit, int& stringLitPrefix);
23 std::string MakeFilePath(const Lexeme& lexeme);
24
25 #endif // TOKEN_VALUE_PARSERS_HPP