3 * Licensed under the MIT License
4 * Copyright (c) Marcel Greter
12 /* You should define ADD_EXPORTS *only* when building the DLL. */
14 #define ADDAPI __declspec(dllexport)
15 #define ADDCALL __cdecl
21 #else /* _WIN32 not defined. */
23 /* Define with no value on non-Windows OSes. */
37 #ifndef SASS2SCSS_VERSION
38 // Hardcode once the file is copied from
39 // https://github.com/mgreter/sass2scss
40 #define SASS2SCSS_VERSION "1.1.0"
43 // add namespace for c++
47 // pretty print options
48 const int SASS2SCSS_PRETTIFY_0 = 0;
49 const int SASS2SCSS_PRETTIFY_1 = 1;
50 const int SASS2SCSS_PRETTIFY_2 = 2;
51 const int SASS2SCSS_PRETTIFY_3 = 3;
53 // remove one-line comment
54 const int SASS2SCSS_KEEP_COMMENT = 32;
55 // remove multi-line comments
56 const int SASS2SCSS_STRIP_COMMENT = 64;
57 // convert one-line to multi-line
58 const int SASS2SCSS_CONVERT_COMMENT = 128;
60 // String for finding something interesting
61 const std::string SASS2SCSS_FIND_WHITESPACE = " \t\n\v\f\r";
82 std::string whitespace;
83 // context/block stack
84 std::stack<std::string> indents;
87 // function only available in c++ code
88 char* sass2scss (const std::string& sass, const int options);
97 // prettyfy print options
98 #define SASS2SCSS_PRETTIFY_0 0
99 #define SASS2SCSS_PRETTIFY_1 1
100 #define SASS2SCSS_PRETTIFY_2 2
101 #define SASS2SCSS_PRETTIFY_3 3
103 // keep one-line comments
104 #define SASS2SCSS_KEEP_COMMENT 32
105 // remove multi-line comments
106 #define SASS2SCSS_STRIP_COMMENT 64
107 // convert one-line to multi-line
108 #define SASS2SCSS_CONVERT_COMMENT 128
110 // available to c and c++ code
111 ADDAPI char* ADDCALL sass2scss (const char* sass, const int options);
113 // Get compiled sass2scss version
114 ADDAPI const char* ADDCALL sass2scss_version(void);
117 } // __cplusplus defined.