1 #ifndef SASS_SASS_CONTEXT_H
2 #define SASS_SASS_CONTEXT_H
5 #include "sass/context.h"
6 #include "ast_fwd_decl.hpp"
8 // sass config options structure
9 struct Sass_Options : Sass_Output_Options {
11 // embed sourceMappingUrl as data uri
12 bool source_map_embed;
14 // embed include contents in maps
15 bool source_map_contents;
17 // create file urls for sources
18 bool source_map_file_urls;
20 // Disable sourceMappingUrl in css output
21 bool omit_source_map_url;
23 // Treat source_string as sass (as opposed to scss)
24 bool is_indented_syntax_src;
26 // The input path is used for source map
27 // generation. It can be used to define
28 // something with string compilation or to
29 // overload the input file path. It is
30 // set to "stdin" for data contexts and
31 // to the input file on file contexts.
34 // The output path is used for source map
35 // generation. LibSass will not write to
36 // this file, it is just used to create
37 // information in source-maps etc.
40 // Colon-separated list of paths
41 // Semicolon-separated on Windows
42 // Maybe use array interface instead?
46 // Include paths (linked string list)
47 struct string_list* include_paths;
48 // Plugin paths (linked string list)
49 struct string_list* plugin_paths;
51 // Path to source map file
52 // Enables source map generation
53 // Used to create sourceMappingUrl
54 char* source_map_file;
56 // Directly inserted in source maps
57 char* source_map_root;
59 // Custom functions that can be called from sccs code
60 Sass_Function_List c_functions;
62 // List of custom importers
63 Sass_Importer_List c_importers;
65 // List of custom headers
66 Sass_Importer_List c_headers;
71 // base for all contexts
72 struct Sass_Context : Sass_Options
75 // store context type info
76 enum Sass_Input_Style type;
78 // generated output data
81 // generated source map json
82 char* source_map_string;
93 const char* error_src;
95 // report imported files
96 char** included_files;
100 // struct for file compilation
101 struct Sass_File_Context : Sass_Context {
103 // no additional fields required
104 // input_path is already on options
108 // struct for data compilation
109 struct Sass_Data_Context : Sass_Context {
111 // provided source string
117 // link c and cpp context
118 struct Sass_Compiler {
120 Sass_Compiler_State state;
121 // original c context
124 Sass::Context* cpp_ctx;
126 Sass::Block_Obj root;