9 #include "ast_fwd_decl.hpp"
11 #define SASS_ASSERT(cond, msg) assert(cond && msg)
15 #define out_of_memory() do { \
16 std::cerr << "Out of memory.\n"; \
20 double round(double val, size_t precision = 0);
21 double sass_atof(const char* str);
22 const char* safe_str(const char *, const char* = "");
23 void free_string_array(char **);
24 char **copy_strings(const std::vector<std::string>&, char ***, int = 0);
25 std::string read_css_string(const std::string& str);
26 std::string evacuate_escapes(const std::string& str);
27 std::string string_to_output(const std::string& str);
28 std::string comment_to_string(const std::string& text);
29 void newline_to_space(std::string& str);
31 std::string quote(const std::string&, char q = 0);
32 std::string unquote(const std::string&, char* q = 0, bool keep_utf8_sequences = false, bool strict = true);
33 char detect_best_quotemark(const char* s, char qm = '"');
35 bool is_hex_doublet(double n);
36 bool is_color_doublet(double r, double g, double b);
38 bool peek_linefeed(const char* start);
42 std::string rtrim(const std::string& str);
44 std::string normalize_underscores(const std::string& str);
45 std::string normalize_decimals(const std::string& str);
47 bool isPrintable(Ruleset_Ptr r, Sass_Output_Style style = NESTED);
48 bool isPrintable(Supports_Block_Ptr r, Sass_Output_Style style = NESTED);
49 bool isPrintable(Media_Block_Ptr r, Sass_Output_Style style = NESTED);
50 bool isPrintable(Comment_Ptr b, Sass_Output_Style style = NESTED);
51 bool isPrintable(Block_Obj b, Sass_Output_Style style = NESTED);
52 bool isPrintable(String_Constant_Ptr s, Sass_Output_Style style = NESTED);
53 bool isPrintable(String_Quoted_Ptr s, Sass_Output_Style style = NESTED);
54 bool isPrintable(Declaration_Ptr d, Sass_Output_Style style = NESTED);
55 bool isAscii(const char chr);