Fix gcc compile bug due to external defined inline
This commit is contained in:
parent
f527920a2d
commit
806580ac2a
2 changed files with 13 additions and 4 deletions
|
|
@ -23,10 +23,6 @@
|
|||
|
||||
std::string import_file(std::string const& path);
|
||||
|
||||
bool is_num(char c);
|
||||
bool is_alpha(char c);
|
||||
bool is_alphanum(char c);
|
||||
|
||||
shmain* parse_text(const char* in, uint32_t size, std::string const& filename="");
|
||||
inline shmain* parse_text(std::string const& in, std::string const& filename="") { return parse_text(in.c_str(), in.size(), filename); }
|
||||
inline shmain* parse(std::string const& file) { return parse_text(import_file(file), file); }
|
||||
|
|
|
|||
|
|
@ -6,6 +6,19 @@
|
|||
#include "options.hpp"
|
||||
#include "parse.hpp"
|
||||
|
||||
inline bool is_num(char c)
|
||||
{
|
||||
return (c >= '0' && c <= '9');
|
||||
}
|
||||
inline bool is_alpha(char c)
|
||||
{
|
||||
return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
|
||||
}
|
||||
inline bool is_alphanum(char c)
|
||||
{
|
||||
return is_alpha(c) || is_num(c);
|
||||
}
|
||||
|
||||
bool is_sub_special_cmd(std::string in)
|
||||
{
|
||||
return in == "%include_sub" || in == "%resolve_sub";
|
||||
|
|
|
|||
Loading…
Reference in a new issue