3 enum Sass_Input_Style {
10 // sass config options structure
11 struct Sass_Inspect_Options {
13 // Output style for the generated css code
14 // A value from above SASS_STYLE_* constants
15 enum Sass_Output_Style output_style;
17 // Precision for fractional numbers
22 // sass config options structure
23 struct Sass_Output_Options : Sass_Inspect_Options {
25 // String to be used for indentation
27 // String to be used to for line feeds
30 // Emit comments in the generated CSS indicating
31 // the corresponding source line.
36 // sass config options structure
37 struct Sass_Options : Sass_Output_Options {
39 // embed sourceMappingUrl as data uri
40 bool source_map_embed;
42 // embed include contents in maps
43 bool source_map_contents;
45 // create file urls for sources
46 bool source_map_file_urls;
48 // Disable sourceMappingUrl in css output
49 bool omit_source_map_url;
51 // Treat source_string as sass (as opposed to scss)
52 bool is_indented_syntax_src;
54 // The input path is used for source map
55 // generation. It can be used to define
56 // something with string compilation or to
57 // overload the input file path. It is
58 // set to "stdin" for data contexts and
59 // to the input file on file contexts.
62 // The output path is used for source map
63 // generation. LibSass will not write to
64 // this file, it is just used to create
65 // information in source-maps etc.
68 // Colon-separated list of paths
69 // Semicolon-separated on Windows
70 // Maybe use array interface instead?
74 // Include paths (linked string list)
75 struct string_list* include_paths;
76 // Plugin paths (linked string list)
77 struct string_list* plugin_paths;
79 // Path to source map file
80 // Enables source map generation
81 // Used to create sourceMappingUrl
82 char* source_map_file;
84 // Directly inserted in source maps
85 char* source_map_root;
87 // Custom functions that can be called from sccs code
88 Sass_Function_List c_functions;
90 // Callback to overload imports
91 Sass_Importer_List c_importers;
93 // List of custom headers
94 Sass_Importer_List c_headers;
98 // base for all contexts
99 struct Sass_Context : Sass_Options
102 // store context type info
103 enum Sass_Input_Style type;
105 // generated output data
108 // generated source map json
109 char* source_map_string;
120 const char* error_src;
122 // report imported files
123 char** included_files;
127 // struct for file compilation
128 struct Sass_File_Context : Sass_Context {
130 // no additional fields required
131 // input_path is already on options
135 // struct for data compilation
136 struct Sass_Data_Context : Sass_Context {
138 // provided source string
145 enum Sass_Compiler_State {
146 SASS_COMPILER_CREATED,
147 SASS_COMPILER_PARSED,
148 SASS_COMPILER_EXECUTED
151 // link c and cpp context
152 struct Sass_Compiler {
154 Sass_Compiler_State state;
155 // original c context
158 Sass::Context* cpp_ctx;
160 Sass::Block_Obj root;