@@ -207,17 +207,22 @@ size_t sass_context_get_error_column (struct Sass_Context* ctx);
207207const char* sass_context_get_source_map_string (struct Sass_Context* ctx);
208208char** sass_context_get_included_files (struct Sass_Context* ctx);
209209
210+ // Getters for Sass_Compiler options (query import stack)
211+ size_t sass_compiler_get_import_stack_size(struct Sass_Compiler* compiler);
212+ Sass_Import_Entry sass_compiler_get_last_import(struct Sass_Compiler* compiler);
213+ Sass_Import_Entry sass_compiler_get_import_entry(struct Sass_Compiler* compiler, size_t idx);
214+ // Getters for Sass_Compiler options (query function stack)
215+ size_t sass_compiler_get_callee_stack_size(struct Sass_Compiler* compiler);
216+ Sass_Callee_Entry sass_compiler_get_last_callee(struct Sass_Compiler* compiler);
217+ Sass_Callee_Entry sass_compiler_get_callee_entry(struct Sass_Compiler* compiler, size_t idx);
218+
210219// Take ownership of memory (value on context is set to 0)
211220char* sass_context_take_error_json (struct Sass_Context* ctx);
212221char* sass_context_take_error_text (struct Sass_Context* ctx);
213222char* sass_context_take_error_message (struct Sass_Context* ctx);
214223char* sass_context_take_error_file (struct Sass_Context* ctx);
215224char* sass_context_take_output_string (struct Sass_Context* ctx);
216225char* sass_context_take_source_map_string (struct Sass_Context* ctx);
217-
218- // Push function for plugin/include paths (no manipulation support for now)
219- void sass_option_push_plugin_path (struct Sass_Options* options, const char* path);
220- void sass_option_push_include_path (struct Sass_Options* options, const char* path);
221226```
222227
223228### Sass Options API
@@ -236,13 +241,18 @@ const char* sass_option_get_indent (struct Sass_Options* options);
236241const char* sass_option_get_linefeed (struct Sass_Options* options);
237242const char* sass_option_get_input_path (struct Sass_Options* options);
238243const char* sass_option_get_output_path (struct Sass_Options* options);
239- const char* sass_option_get_plugin_path (struct Sass_Options* options);
240- const char* sass_option_get_include_path (struct Sass_Options* options);
241244const char* sass_option_get_source_map_file (struct Sass_Options* options);
242245const char* sass_option_get_source_map_root (struct Sass_Options* options);
243246Sass_C_Function_List sass_option_get_c_functions (struct Sass_Options* options);
244247Sass_C_Import_Callback sass_option_get_importer (struct Sass_Options* options);
245248
249+ // Getters for Context_Option include path array
250+ size_t sass_option_get_include_path_size(struct Sass_Options* options);
251+ const char* sass_option_get_include_path(struct Sass_Options* options, size_t i);
252+ // Plugin paths to load dynamic libraries work the same
253+ size_t sass_option_get_plugin_path_size(struct Sass_Options* options);
254+ const char* sass_option_get_plugin_path(struct Sass_Options* options, size_t i);
255+
246256// Setters for Context_Option values
247257void sass_option_set_precision (struct Sass_Options* options, int precision);
248258void sass_option_set_output_style (struct Sass_Options* options, enum Sass_Output_Style output_style);
@@ -266,6 +276,16 @@ void sass_option_set_importer (struct Sass_Options* options, Sass_C_Import_Callb
266276// Push function for paths (no manipulation support for now)
267277void sass_option_push_plugin_path (struct Sass_Options* options, const char* path);
268278void sass_option_push_include_path (struct Sass_Options* options, const char* path);
279+
280+ // Resolve a file via the given include paths in the sass option struct
281+ // find_file looks for the exact file name while find_include does a regular sass include
282+ char* sass_find_file (const char* path, struct Sass_Options* opt);
283+ char* sass_find_include (const char* path, struct Sass_Options* opt);
284+
285+ // Resolve a file relative to last import or include paths in the sass option struct
286+ // find_file looks for the exact file name while find_include does a regular sass include
287+ char* sass_compiler_find_file (const char* path, struct Sass_Compiler* compiler);
288+ char* sass_compiler_find_include (const char* path, struct Sass_Compiler* compiler);
269289```
270290
271291### More links
0 commit comments