1 | #ifndef SASS_SASS_FUNCTIONS_H |
2 | #define SASS_SASS_FUNCTIONS_H |
3 | |
4 | #include "sass.h" |
5 | #include "environment.hpp" |
6 | #include "fn_utils.hpp" |
7 | |
8 | // Struct to hold custom function callback |
9 | struct Sass_Function { |
10 | char* signature; |
11 | Sass_Function_Fn function; |
12 | void* cookie; |
13 | }; |
14 | |
15 | // External import entry |
16 | struct Sass_Import { |
17 | char* imp_path; // path as found in the import statement |
18 | char *abs_path; // path after importer has resolved it |
19 | char* source; |
20 | char* srcmap; |
21 | // error handling |
22 | char* error; |
23 | size_t line; |
24 | size_t column; |
25 | }; |
26 | |
27 | // External environments |
28 | struct Sass_Env { |
29 | // links to parent frames |
30 | Sass::Env* frame; |
31 | }; |
32 | |
33 | // External call entry |
34 | struct Sass_Callee { |
35 | const char* name; |
36 | const char* path; |
37 | size_t line; |
38 | size_t column; |
39 | enum Sass_Callee_Type type; |
40 | struct Sass_Env env; |
41 | }; |
42 | |
43 | // Struct to hold importer callback |
44 | struct Sass_Importer { |
45 | Sass_Importer_Fn importer; |
46 | double priority; |
47 | void* cookie; |
48 | }; |
49 | |
50 | #endif |