1 // must be the first include in all compile units
5 // undefine extensions macro to tell sys includes
6 // that we do not want any macros to be exported
7 // mainly fixes an issue on SmartOS (SEC macro)
11 #pragma warning(disable : 4005)
14 // aplies to MSVC and MinGW
16 // we do not want the ERROR macro
18 // we do not want the min/max macro
20 // we do not want the IN/OUT macro
21 # define _NO_W32_PSEUDO_MODIFIERS
25 // should we be case insensitive
26 // when dealing with files or paths
27 #ifndef FS_CASE_SENSITIVE
29 # define FS_CASE_SENSITIVE 0
31 # define FS_CASE_SENSITIVE 1
35 // path separation char
45 // include C-API header
46 #include "sass/base.h"
54 // create some C++ aliases for the most used options
55 const static Sass_Output_Style NESTED = SASS_STYLE_NESTED;
56 const static Sass_Output_Style COMPACT = SASS_STYLE_COMPACT;
57 const static Sass_Output_Style EXPANDED = SASS_STYLE_EXPANDED;
58 const static Sass_Output_Style COMPRESSED = SASS_STYLE_COMPRESSED;
59 // only used internal to trigger ruby inspect behavior
60 const static Sass_Output_Style INSPECT = SASS_STYLE_INSPECT;
61 const static Sass_Output_Style TO_SASS = SASS_STYLE_TO_SASS;
63 // helper to aid dreaded MSVC debug mode
64 // see implementation for more details
65 char* sass_copy_string(std::string str);
70 enum Sass_Input_Style {
83 // sass config options structure
84 struct Sass_Inspect_Options {
86 // Output style for the generated css code
87 // A value from above SASS_STYLE_* constants
88 enum Sass_Output_Style output_style;
90 // Precision for fractional numbers
93 // initialization list (constructor with defaults)
94 Sass_Inspect_Options(Sass_Output_Style style = Sass::NESTED,
96 : output_style(style), precision(precision)
101 // sass config options structure
102 struct Sass_Output_Options : Sass_Inspect_Options {
104 // String to be used for indentation
106 // String to be used to for line feeds
107 const char* linefeed;
109 // Emit comments in the generated CSS indicating
110 // the corresponding source line.
111 bool source_comments;
113 // initialization list (constructor with defaults)
114 Sass_Output_Options(struct Sass_Inspect_Options opt,
115 const char* indent = " ",
116 const char* linefeed = "\n",
117 bool source_comments = false)
118 : Sass_Inspect_Options(opt),
119 indent(indent), linefeed(linefeed),
120 source_comments(source_comments)
123 // initialization list (constructor with defaults)
124 Sass_Output_Options(Sass_Output_Style style = Sass::NESTED,
126 const char* indent = " ",
127 const char* linefeed = "\n",
128 bool source_comments = false)
129 : Sass_Inspect_Options(style, precision),
130 indent(indent), linefeed(linefeed),
131 source_comments(source_comments)