2016-08-15 03:19:59 +02:00
|
|
|
#ifndef LIBCUBESCRIPT_CS_UTIL_HH
|
|
|
|
#define LIBCUBESCRIPT_CS_UTIL_HH
|
|
|
|
|
2017-02-09 20:59:14 +01:00
|
|
|
#include <type_traits>
|
2017-04-23 15:34:45 +02:00
|
|
|
#include <unordered_map>
|
2021-03-19 02:27:36 +01:00
|
|
|
#include <vector>
|
2017-02-09 20:59:14 +01:00
|
|
|
|
2021-03-22 22:01:49 +01:00
|
|
|
#include "cs_bcode.hh"
|
2021-03-23 01:11:21 +01:00
|
|
|
#include "cs_state.hh"
|
2021-03-22 22:01:49 +01:00
|
|
|
|
2016-08-15 03:19:59 +02:00
|
|
|
namespace cscript {
|
|
|
|
|
2017-02-13 18:10:40 +01:00
|
|
|
cs_int cs_parse_int(
|
2021-03-20 02:26:37 +01:00
|
|
|
std::string_view input, std::string_view *end = nullptr
|
2016-08-15 03:19:59 +02:00
|
|
|
);
|
|
|
|
|
2017-02-13 18:10:40 +01:00
|
|
|
cs_float cs_parse_float(
|
2021-03-20 02:26:37 +01:00
|
|
|
std::string_view input, std::string_view *end = nullptr
|
2016-08-15 03:19:59 +02:00
|
|
|
);
|
|
|
|
|
2021-03-19 02:27:36 +01:00
|
|
|
struct cs_strman;
|
2021-03-19 22:53:42 +01:00
|
|
|
struct cs_shared_state;
|
|
|
|
|
2021-03-23 01:11:21 +01:00
|
|
|
inline cs_strref cs_make_strref(char const *p, cs_shared_state *cs) {
|
2021-03-19 02:27:36 +01:00
|
|
|
return cs_strref{p, cs};
|
|
|
|
}
|
2021-03-16 00:44:25 +01:00
|
|
|
|
2016-08-15 03:19:59 +02:00
|
|
|
} /* namespace cscript */
|
|
|
|
|
|
|
|
#endif /* LIBCUBESCRIPT_CS_UTIL_HH */
|