sassc 1.7.1 → 1.8.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -1
  3. data/ext/libsass/.gitignore +10 -6
  4. data/ext/libsass/.travis.yml +4 -1
  5. data/ext/libsass/GNUmakefile.am +88 -0
  6. data/ext/libsass/Makefile +157 -76
  7. data/ext/libsass/Makefile.conf +47 -0
  8. data/ext/libsass/Readme.md +13 -14
  9. data/ext/libsass/appveyor.yml +25 -41
  10. data/ext/libsass/configure.ac +20 -7
  11. data/ext/libsass/contrib/plugin.cpp +1 -1
  12. data/ext/libsass/include/sass.h +15 -0
  13. data/ext/libsass/{sass.h → include/sass/base.h} +17 -9
  14. data/ext/libsass/{sass_context.h → include/sass/context.h} +3 -1
  15. data/ext/libsass/{sass_functions.h → include/sass/functions.h} +4 -4
  16. data/ext/libsass/{sass_interface.h → include/sass/interface.h} +5 -2
  17. data/ext/libsass/{sass_values.h → include/sass/values.h} +15 -1
  18. data/ext/libsass/{sass_version.h → include/sass/version.h} +0 -0
  19. data/ext/libsass/{sass_version.h.in → include/sass/version.h.in} +0 -0
  20. data/ext/libsass/{sass2scss.h → include/sass2scss.h} +6 -7
  21. data/ext/libsass/m4/m4-ax_cxx_compile_stdcxx_11.m4 +167 -0
  22. data/ext/libsass/script/ci-build-libsass +67 -23
  23. data/ext/libsass/src/GNUmakefile.am +54 -0
  24. data/ext/libsass/src/ast.cpp +2029 -0
  25. data/ext/libsass/{ast.hpp → src/ast.hpp} +832 -660
  26. data/ext/libsass/src/ast_def_macros.hpp +47 -0
  27. data/ext/libsass/src/ast_factory.hpp +93 -0
  28. data/ext/libsass/{ast_fwd_decl.hpp → src/ast_fwd_decl.hpp} +9 -4
  29. data/ext/libsass/{b64 → src/b64}/cencode.h +1 -1
  30. data/ext/libsass/{b64 → src/b64}/encode.h +0 -0
  31. data/ext/libsass/{backtrace.hpp → src/backtrace.hpp} +9 -10
  32. data/ext/libsass/{base64vlq.cpp → src/base64vlq.cpp} +2 -2
  33. data/ext/libsass/{base64vlq.hpp → src/base64vlq.hpp} +1 -2
  34. data/ext/libsass/{bind.cpp → src/bind.cpp} +96 -59
  35. data/ext/libsass/{bind.hpp → src/bind.hpp} +1 -1
  36. data/ext/libsass/src/c99func.c +54 -0
  37. data/ext/libsass/{cencode.c → src/cencode.c} +5 -5
  38. data/ext/libsass/src/color_maps.cpp +643 -0
  39. data/ext/libsass/src/color_maps.hpp +333 -0
  40. data/ext/libsass/{constants.cpp → src/constants.cpp} +10 -1
  41. data/ext/libsass/{constants.hpp → src/constants.hpp} +7 -0
  42. data/ext/libsass/{context.cpp → src/context.cpp} +152 -122
  43. data/ext/libsass/src/context.hpp +150 -0
  44. data/ext/libsass/{cssize.cpp → src/cssize.cpp} +123 -109
  45. data/ext/libsass/{cssize.hpp → src/cssize.hpp} +9 -13
  46. data/ext/libsass/{debug.hpp → src/debug.hpp} +9 -9
  47. data/ext/libsass/src/debugger.hpp +683 -0
  48. data/ext/libsass/{emitter.cpp → src/emitter.cpp} +13 -13
  49. data/ext/libsass/{emitter.hpp → src/emitter.hpp} +10 -11
  50. data/ext/libsass/src/environment.cpp +184 -0
  51. data/ext/libsass/src/environment.hpp +92 -0
  52. data/ext/libsass/src/error_handling.cpp +46 -0
  53. data/ext/libsass/src/error_handling.hpp +34 -0
  54. data/ext/libsass/src/eval.cpp +1462 -0
  55. data/ext/libsass/src/eval.hpp +107 -0
  56. data/ext/libsass/src/expand.cpp +653 -0
  57. data/ext/libsass/{expand.hpp → src/expand.hpp} +17 -16
  58. data/ext/libsass/{extend.cpp → src/extend.cpp} +198 -139
  59. data/ext/libsass/{extend.hpp → src/extend.hpp} +7 -8
  60. data/ext/libsass/{file.cpp → src/file.cpp} +103 -57
  61. data/ext/libsass/{file.hpp → src/file.hpp} +23 -14
  62. data/ext/libsass/{functions.cpp → src/functions.cpp} +642 -333
  63. data/ext/libsass/{functions.hpp → src/functions.hpp} +17 -4
  64. data/ext/libsass/{inspect.cpp → src/inspect.cpp} +147 -260
  65. data/ext/libsass/{inspect.hpp → src/inspect.hpp} +7 -7
  66. data/ext/libsass/{json.cpp → src/json.cpp} +33 -43
  67. data/ext/libsass/{json.hpp → src/json.hpp} +1 -1
  68. data/ext/libsass/{kwd_arg_macros.hpp → src/kwd_arg_macros.hpp} +0 -0
  69. data/ext/libsass/{lexer.cpp → src/lexer.cpp} +28 -0
  70. data/ext/libsass/{lexer.hpp → src/lexer.hpp} +25 -10
  71. data/ext/libsass/{listize.cpp → src/listize.cpp} +17 -13
  72. data/ext/libsass/{listize.hpp → src/listize.hpp} +0 -2
  73. data/ext/libsass/{mapping.hpp → src/mapping.hpp} +0 -0
  74. data/ext/libsass/src/memory_manager.cpp +76 -0
  75. data/ext/libsass/src/memory_manager.hpp +48 -0
  76. data/ext/libsass/{node.cpp → src/node.cpp} +89 -18
  77. data/ext/libsass/{node.hpp → src/node.hpp} +5 -6
  78. data/ext/libsass/{operation.hpp → src/operation.hpp} +18 -12
  79. data/ext/libsass/{output.cpp → src/output.cpp} +47 -55
  80. data/ext/libsass/{output.hpp → src/output.hpp} +5 -4
  81. data/ext/libsass/src/parser.cpp +2529 -0
  82. data/ext/libsass/{parser.hpp → src/parser.hpp} +84 -60
  83. data/ext/libsass/{paths.hpp → src/paths.hpp} +10 -13
  84. data/ext/libsass/{plugins.cpp → src/plugins.cpp} +14 -17
  85. data/ext/libsass/{plugins.hpp → src/plugins.hpp} +10 -11
  86. data/ext/libsass/{position.cpp → src/position.cpp} +5 -6
  87. data/ext/libsass/{position.hpp → src/position.hpp} +19 -22
  88. data/ext/libsass/{prelexer.cpp → src/prelexer.cpp} +401 -53
  89. data/ext/libsass/{prelexer.hpp → src/prelexer.hpp} +50 -10
  90. data/ext/libsass/{remove_placeholders.cpp → src/remove_placeholders.cpp} +12 -16
  91. data/ext/libsass/{remove_placeholders.hpp → src/remove_placeholders.hpp} +1 -7
  92. data/ext/libsass/{sass.cpp → src/sass.cpp} +3 -5
  93. data/ext/libsass/{sass2scss.cpp → src/sass2scss.cpp} +51 -46
  94. data/ext/libsass/{sass_context.cpp → src/sass_context.cpp} +114 -112
  95. data/ext/libsass/{sass_functions.cpp → src/sass_functions.cpp} +11 -18
  96. data/ext/libsass/{sass_interface.cpp → src/sass_interface.cpp} +44 -81
  97. data/ext/libsass/{sass_util.cpp → src/sass_util.cpp} +26 -8
  98. data/ext/libsass/{sass_util.hpp → src/sass_util.hpp} +14 -18
  99. data/ext/libsass/{sass_values.cpp → src/sass_values.cpp} +91 -20
  100. data/ext/libsass/{source_map.cpp → src/source_map.cpp} +13 -13
  101. data/ext/libsass/{source_map.hpp → src/source_map.hpp} +9 -9
  102. data/ext/libsass/{subset_map.hpp → src/subset_map.hpp} +29 -31
  103. data/ext/libsass/{support → src/support}/libsass.pc.in +0 -0
  104. data/ext/libsass/src/to_c.cpp +73 -0
  105. data/ext/libsass/src/to_c.hpp +41 -0
  106. data/ext/libsass/src/to_string.cpp +47 -0
  107. data/ext/libsass/{to_string.hpp → src/to_string.hpp} +9 -7
  108. data/ext/libsass/src/to_value.cpp +109 -0
  109. data/ext/libsass/src/to_value.hpp +50 -0
  110. data/ext/libsass/{units.cpp → src/units.cpp} +56 -51
  111. data/ext/libsass/{units.hpp → src/units.hpp} +8 -9
  112. data/ext/libsass/{utf8.h → src/utf8.h} +0 -0
  113. data/ext/libsass/{utf8 → src/utf8}/checked.h +0 -0
  114. data/ext/libsass/{utf8 → src/utf8}/core.h +12 -12
  115. data/ext/libsass/{utf8 → src/utf8}/unchecked.h +0 -0
  116. data/ext/libsass/{utf8_string.cpp → src/utf8_string.cpp} +0 -0
  117. data/ext/libsass/{utf8_string.hpp → src/utf8_string.hpp} +6 -6
  118. data/ext/libsass/{util.cpp → src/util.cpp} +144 -86
  119. data/ext/libsass/src/util.hpp +59 -0
  120. data/ext/libsass/src/values.cpp +137 -0
  121. data/ext/libsass/src/values.hpp +12 -0
  122. data/ext/libsass/test/test_node.cpp +33 -33
  123. data/ext/libsass/test/test_paths.cpp +5 -6
  124. data/ext/libsass/test/test_selector_difference.cpp +4 -5
  125. data/ext/libsass/test/test_specificity.cpp +4 -5
  126. data/ext/libsass/test/test_subset_map.cpp +91 -91
  127. data/ext/libsass/test/test_superselector.cpp +11 -11
  128. data/ext/libsass/test/test_unification.cpp +4 -4
  129. data/ext/libsass/win/libsass.targets +101 -0
  130. data/ext/libsass/win/libsass.vcxproj +45 -127
  131. data/ext/libsass/win/libsass.vcxproj.filters +303 -0
  132. data/lib/sassc/import_handler.rb +1 -1
  133. data/lib/sassc/native/native_functions_api.rb +3 -3
  134. data/lib/sassc/version.rb +1 -1
  135. data/test/custom_importer_test.rb +1 -4
  136. data/test/functions_test.rb +3 -2
  137. data/test/native_test.rb +4 -3
  138. metadata +117 -110
  139. data/ext/libsass/Makefile.am +0 -146
  140. data/ext/libsass/ast.cpp +0 -945
  141. data/ext/libsass/ast_def_macros.hpp +0 -21
  142. data/ext/libsass/ast_factory.hpp +0 -92
  143. data/ext/libsass/color_names.hpp +0 -327
  144. data/ext/libsass/context.hpp +0 -157
  145. data/ext/libsass/contextualize.cpp +0 -148
  146. data/ext/libsass/contextualize.hpp +0 -46
  147. data/ext/libsass/contextualize_eval.cpp +0 -93
  148. data/ext/libsass/contextualize_eval.hpp +0 -44
  149. data/ext/libsass/debugger.hpp +0 -558
  150. data/ext/libsass/environment.hpp +0 -163
  151. data/ext/libsass/error_handling.cpp +0 -35
  152. data/ext/libsass/error_handling.hpp +0 -32
  153. data/ext/libsass/eval.cpp +0 -1392
  154. data/ext/libsass/eval.hpp +0 -88
  155. data/ext/libsass/expand.cpp +0 -575
  156. data/ext/libsass/memory_manager.hpp +0 -57
  157. data/ext/libsass/parser.cpp +0 -2403
  158. data/ext/libsass/posix/getopt.c +0 -562
  159. data/ext/libsass/posix/getopt.h +0 -95
  160. data/ext/libsass/to_c.cpp +0 -61
  161. data/ext/libsass/to_c.hpp +0 -44
  162. data/ext/libsass/to_string.cpp +0 -34
  163. data/ext/libsass/util.hpp +0 -54
  164. data/ext/libsass/win/libsass.filters +0 -312
@@ -1,21 +0,0 @@
1
- #ifndef SASS_AST_DEF_MACROS_H
2
- #define SASS_AST_DEF_MACROS_H
3
-
4
- #define ATTACH_OPERATIONS()\
5
- virtual void perform(Operation<void>* op) { (*op)(this); }\
6
- virtual AST_Node* perform(Operation<AST_Node*>* op) { return (*op)(this); }\
7
- virtual Statement* perform(Operation<Statement*>* op) { return (*op)(this); }\
8
- virtual Expression* perform(Operation<Expression*>* op) { return (*op)(this); }\
9
- virtual Selector* perform(Operation<Selector*>* op) { return (*op)(this); }\
10
- virtual string perform(Operation<string>* op) { return (*op)(this); }\
11
- virtual Sass_Value* perform(Operation<Sass_Value*>* op) { return (*op)(this); }
12
-
13
- #define ADD_PROPERTY(type, name)\
14
- protected:\
15
- type name##_;\
16
- public:\
17
- type name() const { return name##_; }\
18
- type name(type name##__) { return name##_ = name##__; }\
19
- private:
20
-
21
- #endif
@@ -1,92 +0,0 @@
1
- #ifndef SASS_AST_FACTORY_H
2
- #define SASS_AST_FACTORY_H
3
-
4
- #include <vector>
5
-
6
- #include "ast.hpp"
7
-
8
- namespace Sass {
9
- using namespace std;
10
-
11
- class AST_Factory {
12
- vector<AST_Node*> nodes;
13
- public:
14
- // statements
15
- Block* new_Block(string p, size_t l, size_t s = 0, bool r = false);
16
- Ruleset* new_Ruleset(string p, size_t l, Selector* s, Block* b);
17
- Propset* new_Propset(string p, size_t l, String* pf, Block* b);
18
- Feature_Query* new_Feature_Query(string p, size_t l, Feature_Query* f, Block* b);
19
- Media_Query* new_Media_Query(string p, size_t l, List* q, Block* b);
20
- At_Root_Block* new_At_Root_Block(string p, size_t l, Selector* sel, Block* b);
21
- At_Rule* new_At_Rule(string p, size_t l, string kwd, Selector* sel, Block* b);
22
- Keyframe_Rule* new_Keyframe_Rule(string p, size_t l, Block* b);
23
- Declaration* new_Declaration(string p, size_t l, String* prop, List* vals);
24
- Assignment* new_Assignment(string p, size_t l, string var, Expression* val, bool guarded = false);
25
- Import<Function_Call*>* new_CSS_Import(string p, size_t l, Function_Call* loc);
26
- Import<String*>* new_SASS_Import(string p, size_t l, String* loc);
27
- Warning* new_Warning(string p, size_t l, Expression* msg);
28
- Error* new_Error(string p, size_t l, Expression* msg);
29
- Debug* new_Debug(string p, size_t l, Expression* val);
30
- Comment* new_Comment(string p, size_t l, String* txt);
31
- If* new_If(string p, size_t l, Expression* pred, Block* con, Block* alt = 0);
32
- For* new_For(string p, size_t l, string var, Expression* lo, Expression* hi, Block* b, bool inc);
33
- Each* new_Each(string p, size_t l, vector<string> vars, Expression* lst, Block* b);
34
- While* new_While(string p, size_t l, Expression* pred, Block* b);
35
- Extension* new_Extension(string p, size_t l, Selector* s);
36
- Definition<MIXIN>* new_Mixin_Definition(string p, size_t l, string n, Parameters* params, Block* b);
37
- Definition<FUNCTION>* new_Function_Definition(string p, size_t l, string n, Parameters* params, Block* b);
38
- Mixin_Call* new_Mixin_Call(string p, size_t l, string n, Arguments* args, Block* b = 0);
39
- // expressions
40
- List* new_List(string p, size_t l, size_t size = 0, List::Separator sep = List::space, bool argl = false);
41
- Map* new_Map(string p, size_t l, size_t size = 0);
42
- Binary_Expression<AND>* new_And(string p, size_t l, Expression* lhs, Expression* rhs);
43
- Binary_Expression<OR>* new_Or(string p, size_t l, Expression* lhs, Expression* rhs);
44
- Binary_Expression<EQ>* new_Eq(string p, size_t l, Expression* lhs, Expression* rhs);
45
- Binary_Expression<NEQ>* new_Neq(string p, size_t l, Expression* lhs, Expression* rhs);
46
- Binary_Expression<GT>* new_Gt(string p, size_t l, Expression* lhs, Expression* rhs);
47
- Binary_Expression<GTE>* new_Gte(string p, size_t l, Expression* lhs, Expression* rhs);
48
- Binary_Expression<LT>* new_Lt(string p, size_t l, Expression* lhs, Expression* rhs);
49
- Binary_Expression<LTE>* new_Lte(string p, size_t l, Expression* lhs, Expression* rhs);
50
- Binary_Expression<ADD>* new_Add(string p, size_t l, Expression* lhs, Expression* rhs);
51
- Binary_Expression<SUB>* new_Sub(string p, size_t l, Expression* lhs, Expression* rhs);
52
- Binary_Expression<MUL>* new_Mul(string p, size_t l, Expression* lhs, Expression* rhs);
53
- Binary_Expression<DIV>* new_Div(string p, size_t l, Expression* lhs, Expression* rhs);
54
- Negation* new_Negation(string p, size_t l, Expression* o);
55
- Function_Call* new_Function_Call(string p, size_t l, String* n, Arguments* args);
56
- Variable* new_Variable(string p, size_t l, string n);
57
- Textual<NUMBER>* new_Textual_Number(string p, size_t l, string val);
58
- Textual<PERCENTAGE>* new_Textual_Percentage(string p, size_t l, string val);
59
- Textual<DIMENSION>* new_Textual_Dimension(string p, size_t l, string val);
60
- Textual<HEX>* new_Textual_Hex(string p, size_t l, string val);
61
- Number* new_Number(string p, size_t l, double val);
62
- Percentage* new_Percentage(string p, size_t l, double val);
63
- Dimension* new_Dimension(string p, size_t l, double val, string unit);
64
- Color* new_Color(string p, size_t l, double r, double g, double b, double a = 1, string disp = "");
65
- Boolean* new_Boolean(string p, size_t l, bool val);
66
- String_Schema* new_String_Schema(string p, size_t l, size_t size = 0);
67
- String_Constant* new_String_Constant(string p, size_t l, string val);
68
- String_Constant* new_String_Constant(string p, size_t l, const char* beg);
69
- String_Constant* new_String_Constant(string p, size_t l, const char* beg, const char* end);
70
- Feature_Query_Condition* new_Feature_Query_Condition(string p, size_t l, String* f, Expression* v);
71
- Media_Expression* new_Media_Expression(string p, size_t l, String* f, Expression* v);
72
- Parent_Selector* new_Parent_Selector(string p, size_t l, Selector* s);
73
- // parameters and arguments
74
- Parameter* new_Parameter(string p, size_t l, string n, Expression* def = 0, bool rest = false);
75
- Parameters* new_Parameters(string p, size_t l);
76
- Argument* new_Argument(string p, size_t l, Expression* val, string n = "", bool rest = false);
77
- Arguments* new_Arguments(string p, size_t l);
78
- // selectors
79
- Selector_Schema* new_Selector_Schema(string p, size_t l, String* c);
80
- Attribute_Selector* new_Attribute_Selector(string p, size_t l, string n, string m, String* v);
81
- Simple_Selector* new_Simple_Selector(string p, size_t l, string c);
82
- Reference_Selector* new_Reference_Selector(string p, size_t l);
83
- Placeholder_Selector* new_Placeholder_Selector(string p, size_t l, string n);
84
- Pseudo_Selector* new_Pseudo_Selector(string p, size_t l, string n, Expression* expr = 0);
85
- Wrapped_Selector* new_Wrapped_Selector(string p, size_t l, string n, Simple_Base* sel);
86
- Compound_Selector* new_Compound_Selector(string p, size_t l, size_t s = 0);
87
- Complex_Selector* new_Complex_Selector(string p, size_t l, Complex_Selector::Combinator c, Complex_Selector* ctx, Compound_Selector* sel);
88
- Selector_List* new_Selector_List(string p, size_t l, size_t s = 0);
89
- };
90
- }
91
-
92
- #endif
@@ -1,327 +0,0 @@
1
- #ifndef SASS_COLOR_NAMES_H
2
- #define SASS_COLOR_NAMES_H
3
-
4
- namespace Sass {
5
-
6
- /*
7
- * Color names are processed in order. For color names with alternate aliases
8
- * (i.e. gray & grey), the canonical name should be listed last, so it takes
9
- * precedence.
10
- */
11
- const char* color_names[] =
12
- {
13
- "aliceblue",
14
- "antiquewhite",
15
- "aqua",
16
- "aquamarine",
17
- "azure",
18
- "beige",
19
- "bisque",
20
- "black",
21
- "blanchedalmond",
22
- "blue",
23
- "blueviolet",
24
- "brown",
25
- "burlywood",
26
- "cadetblue",
27
- "chartreuse",
28
- "chocolate",
29
- "coral",
30
- "cornflowerblue",
31
- "cornsilk",
32
- "crimson",
33
- "cyan",
34
- "darkblue",
35
- "darkcyan",
36
- "darkgoldenrod",
37
- "darkgrey",
38
- "darkgray",
39
- "darkgreen",
40
- "darkkhaki",
41
- "darkmagenta",
42
- "darkolivegreen",
43
- "darkorange",
44
- "darkorchid",
45
- "darkred",
46
- "darksalmon",
47
- "darkseagreen",
48
- "darkslateblue",
49
- "darkslategrey",
50
- "darkslategray",
51
- "darkturquoise",
52
- "darkviolet",
53
- "deeppink",
54
- "deepskyblue",
55
- "dimgrey",
56
- "dimgray",
57
- "dodgerblue",
58
- "firebrick",
59
- "floralwhite",
60
- "forestgreen",
61
- "fuchsia",
62
- "gainsboro",
63
- "ghostwhite",
64
- "gold",
65
- "goldenrod",
66
- "grey",
67
- "gray",
68
- "green",
69
- "greenyellow",
70
- "honeydew",
71
- "hotpink",
72
- "indianred",
73
- "indigo",
74
- "ivory",
75
- "khaki",
76
- "lavender",
77
- "lavenderblush",
78
- "lawngreen",
79
- "lemonchiffon",
80
- "lightblue",
81
- "lightcoral",
82
- "lightcyan",
83
- "lightgoldenrodyellow",
84
- "lightgrey",
85
- "lightgray",
86
- "lightgreen",
87
- "lightpink",
88
- "lightsalmon",
89
- "lightseagreen",
90
- "lightskyblue",
91
- "lightslategrey",
92
- "lightslategray",
93
- "lightsteelblue",
94
- "lightyellow",
95
- "lime",
96
- "limegreen",
97
- "linen",
98
- "magenta",
99
- "maroon",
100
- "mediumaquamarine",
101
- "mediumblue",
102
- "mediumorchid",
103
- "mediumpurple",
104
- "mediumseagreen",
105
- "mediumslateblue",
106
- "mediumspringgreen",
107
- "mediumturquoise",
108
- "mediumvioletred",
109
- "midnightblue",
110
- "mintcream",
111
- "mistyrose",
112
- "moccasin",
113
- "navajowhite",
114
- "navy",
115
- "oldlace",
116
- "olive",
117
- "olivedrab",
118
- "orange",
119
- "orangered",
120
- "orchid",
121
- "palegoldenrod",
122
- "palegreen",
123
- "paleturquoise",
124
- "palevioletred",
125
- "papayawhip",
126
- "peachpuff",
127
- "peru",
128
- "pink",
129
- "plum",
130
- "powderblue",
131
- "purple",
132
- "red",
133
- "rosybrown",
134
- "royalblue",
135
- "saddlebrown",
136
- "salmon",
137
- "sandybrown",
138
- "seagreen",
139
- "seashell",
140
- "sienna",
141
- "silver",
142
- "skyblue",
143
- "slateblue",
144
- "slategrey",
145
- "slategray",
146
- "snow",
147
- "springgreen",
148
- "steelblue",
149
- "tan",
150
- "teal",
151
- "thistle",
152
- "tomato",
153
- "turquoise",
154
- "violet",
155
- "wheat",
156
- "white",
157
- "whitesmoke",
158
- "yellow",
159
- "yellowgreen",
160
- // rebeccapurple
161
- "rebeccapurple",
162
- // transparent
163
- "transparent",
164
- // sentinel value
165
- 0
166
- };
167
-
168
- const double color_values[] =
169
- {
170
- 0xf0, 0xf8, 0xff, 1,
171
- 0xfa, 0xeb, 0xd7, 1,
172
- 0x00, 0xff, 0xff, 1,
173
- 0x7f, 0xff, 0xd4, 1,
174
- 0xf0, 0xff, 0xff, 1,
175
- 0xf5, 0xf5, 0xdc, 1,
176
- 0xff, 0xe4, 0xc4, 1,
177
- 0x00, 0x00, 0x00, 1,
178
- 0xff, 0xeb, 0xcd, 1,
179
- 0x00, 0x00, 0xff, 1,
180
- 0x8a, 0x2b, 0xe2, 1,
181
- 0xa5, 0x2a, 0x2a, 1,
182
- 0xde, 0xb8, 0x87, 1,
183
- 0x5f, 0x9e, 0xa0, 1,
184
- 0x7f, 0xff, 0x00, 1,
185
- 0xd2, 0x69, 0x1e, 1,
186
- 0xff, 0x7f, 0x50, 1,
187
- 0x64, 0x95, 0xed, 1,
188
- 0xff, 0xf8, 0xdc, 1,
189
- 0xdc, 0x14, 0x3c, 1,
190
- 0x00, 0xff, 0xff, 1,
191
- 0x00, 0x00, 0x8b, 1,
192
- 0x00, 0x8b, 0x8b, 1,
193
- 0xb8, 0x86, 0x0b, 1,
194
- 0xa9, 0xa9, 0xa9, 1,
195
- 0xa9, 0xa9, 0xa9, 1,
196
- 0x00, 0x64, 0x00, 1,
197
- 0xbd, 0xb7, 0x6b, 1,
198
- 0x8b, 0x00, 0x8b, 1,
199
- 0x55, 0x6b, 0x2f, 1,
200
- 0xff, 0x8c, 0x00, 1,
201
- 0x99, 0x32, 0xcc, 1,
202
- 0x8b, 0x00, 0x00, 1,
203
- 0xe9, 0x96, 0x7a, 1,
204
- 0x8f, 0xbc, 0x8f, 1,
205
- 0x48, 0x3d, 0x8b, 1,
206
- 0x2f, 0x4f, 0x4f, 1,
207
- 0x2f, 0x4f, 0x4f, 1,
208
- 0x00, 0xce, 0xd1, 1,
209
- 0x94, 0x00, 0xd3, 1,
210
- 0xff, 0x14, 0x93, 1,
211
- 0x00, 0xbf, 0xff, 1,
212
- 0x69, 0x69, 0x69, 1,
213
- 0x69, 0x69, 0x69, 1,
214
- 0x1e, 0x90, 0xff, 1,
215
- 0xb2, 0x22, 0x22, 1,
216
- 0xff, 0xfa, 0xf0, 1,
217
- 0x22, 0x8b, 0x22, 1,
218
- 0xff, 0x00, 0xff, 1,
219
- 0xdc, 0xdc, 0xdc, 1,
220
- 0xf8, 0xf8, 0xff, 1,
221
- 0xff, 0xd7, 0x00, 1,
222
- 0xda, 0xa5, 0x20, 1,
223
- 0x80, 0x80, 0x80, 1,
224
- 0x80, 0x80, 0x80, 1,
225
- 0x00, 0x80, 0x00, 1,
226
- 0xad, 0xff, 0x2f, 1,
227
- 0xf0, 0xff, 0xf0, 1,
228
- 0xff, 0x69, 0xb4, 1,
229
- 0xcd, 0x5c, 0x5c, 1,
230
- 0x4b, 0x00, 0x82, 1,
231
- 0xff, 0xff, 0xf0, 1,
232
- 0xf0, 0xe6, 0x8c, 1,
233
- 0xe6, 0xe6, 0xfa, 1,
234
- 0xff, 0xf0, 0xf5, 1,
235
- 0x7c, 0xfc, 0x00, 1,
236
- 0xff, 0xfa, 0xcd, 1,
237
- 0xad, 0xd8, 0xe6, 1,
238
- 0xf0, 0x80, 0x80, 1,
239
- 0xe0, 0xff, 0xff, 1,
240
- 0xfa, 0xfa, 0xd2, 1,
241
- 0xd3, 0xd3, 0xd3, 1,
242
- 0xd3, 0xd3, 0xd3, 1,
243
- 0x90, 0xee, 0x90, 1,
244
- 0xff, 0xb6, 0xc1, 1,
245
- 0xff, 0xa0, 0x7a, 1,
246
- 0x20, 0xb2, 0xaa, 1,
247
- 0x87, 0xce, 0xfa, 1,
248
- 0x77, 0x88, 0x99, 1,
249
- 0x77, 0x88, 0x99, 1,
250
- 0xb0, 0xc4, 0xde, 1,
251
- 0xff, 0xff, 0xe0, 1,
252
- 0x00, 0xff, 0x00, 1,
253
- 0x32, 0xcd, 0x32, 1,
254
- 0xfa, 0xf0, 0xe6, 1,
255
- 0xff, 0x00, 0xff, 1,
256
- 0x80, 0x00, 0x00, 1,
257
- 0x66, 0xcd, 0xaa, 1,
258
- 0x00, 0x00, 0xcd, 1,
259
- 0xba, 0x55, 0xd3, 1,
260
- 0x93, 0x70, 0xdb, 1,
261
- 0x3c, 0xb3, 0x71, 1,
262
- 0x7b, 0x68, 0xee, 1,
263
- 0x00, 0xfa, 0x9a, 1,
264
- 0x48, 0xd1, 0xcc, 1,
265
- 0xc7, 0x15, 0x85, 1,
266
- 0x19, 0x19, 0x70, 1,
267
- 0xf5, 0xff, 0xfa, 1,
268
- 0xff, 0xe4, 0xe1, 1,
269
- 0xff, 0xe4, 0xb5, 1,
270
- 0xff, 0xde, 0xad, 1,
271
- 0x00, 0x00, 0x80, 1,
272
- 0xfd, 0xf5, 0xe6, 1,
273
- 0x80, 0x80, 0x00, 1,
274
- 0x6b, 0x8e, 0x23, 1,
275
- 0xff, 0xa5, 0x00, 1,
276
- 0xff, 0x45, 0x00, 1,
277
- 0xda, 0x70, 0xd6, 1,
278
- 0xee, 0xe8, 0xaa, 1,
279
- 0x98, 0xfb, 0x98, 1,
280
- 0xaf, 0xee, 0xee, 1,
281
- 0xdb, 0x70, 0x93, 1,
282
- 0xff, 0xef, 0xd5, 1,
283
- 0xff, 0xda, 0xb9, 1,
284
- 0xcd, 0x85, 0x3f, 1,
285
- 0xff, 0xc0, 0xcb, 1,
286
- 0xdd, 0xa0, 0xdd, 1,
287
- 0xb0, 0xe0, 0xe6, 1,
288
- 0x80, 0x00, 0x80, 1,
289
- 0xff, 0x00, 0x00, 1,
290
- 0xbc, 0x8f, 0x8f, 1,
291
- 0x41, 0x69, 0xe1, 1,
292
- 0x8b, 0x45, 0x13, 1,
293
- 0xfa, 0x80, 0x72, 1,
294
- 0xf4, 0xa4, 0x60, 1,
295
- 0x2e, 0x8b, 0x57, 1,
296
- 0xff, 0xf5, 0xee, 1,
297
- 0xa0, 0x52, 0x2d, 1,
298
- 0xc0, 0xc0, 0xc0, 1,
299
- 0x87, 0xce, 0xeb, 1,
300
- 0x6a, 0x5a, 0xcd, 1,
301
- 0x70, 0x80, 0x90, 1,
302
- 0x70, 0x80, 0x90, 1,
303
- 0xff, 0xfa, 0xfa, 1,
304
- 0x00, 0xff, 0x7f, 1,
305
- 0x46, 0x82, 0xb4, 1,
306
- 0xd2, 0xb4, 0x8c, 1,
307
- 0x00, 0x80, 0x80, 1,
308
- 0xd8, 0xbf, 0xd8, 1,
309
- 0xff, 0x63, 0x47, 1,
310
- 0x40, 0xe0, 0xd0, 1,
311
- 0xee, 0x82, 0xee, 1,
312
- 0xf5, 0xde, 0xb3, 1,
313
- 0xff, 0xff, 0xff, 1,
314
- 0xf5, 0xf5, 0xf5, 1,
315
- 0xff, 0xff, 0x00, 1,
316
- 0x9a, 0xcd, 0x32, 1,
317
- // rebeccapurple
318
- 0x66, 0x33, 0x99, 1,
319
- // transparent
320
- 0x00, 0x00, 0x00, 0,
321
- // sentinel value
322
- 0xfff
323
- };
324
-
325
- }
326
-
327
- #endif
@@ -1,157 +0,0 @@
1
- #ifndef SASS_CONTEXT_H
2
- #define SASS_CONTEXT_H
3
-
4
- #include <string>
5
- #include <vector>
6
- #include <map>
7
-
8
- #define BUFFERSIZE 255
9
- #include "b64/encode.h"
10
-
11
- #include "ast_fwd_decl.hpp"
12
- #include "kwd_arg_macros.hpp"
13
- #include "memory_manager.hpp"
14
- #include "environment.hpp"
15
- #include "source_map.hpp"
16
- #include "subset_map.hpp"
17
- #include "output.hpp"
18
- #include "plugins.hpp"
19
- #include "sass_functions.h"
20
-
21
- struct Sass_Function;
22
-
23
- namespace Sass {
24
- using namespace std;
25
- struct Sass_Queued {
26
- string abs_path;
27
- string load_path;
28
- const char* source;
29
- public:
30
- Sass_Queued(const string& load_path, const string& abs_path, const char* source);
31
- };
32
-
33
- class Context {
34
- public:
35
- size_t head_imports;
36
- Memory_Manager<AST_Node> mem;
37
-
38
- struct Sass_Options* c_options;
39
- struct Sass_Compiler* c_compiler;
40
- const char* source_c_str;
41
-
42
- // c-strs containing Sass file contents
43
- // we will overtake ownership of memory
44
- vector<const char*> sources;
45
- // absolute paths to includes
46
- vector<string> included_files;
47
- // relative links to includes
48
- vector<string> include_links;
49
- // vectors above have same size
50
-
51
- vector<string> plugin_paths; // relative paths to load plugins
52
- vector<string> include_paths; // lookup paths for includes
53
- vector<Sass_Queued> queue; // queue of files to be parsed
54
- map<string, Block*> style_sheets; // map of paths to ASTs
55
- // SourceMap source_map;
56
- Output emitter;
57
-
58
- vector<Sass_Importer_Entry> c_headers;
59
- vector<Sass_Importer_Entry> c_importers;
60
- vector<Sass_Function_Entry> c_functions;
61
-
62
- void add_c_header(Sass_Importer_Entry header);
63
- void add_c_importer(Sass_Importer_Entry importer);
64
- void add_c_function(Sass_Function_Entry function);
65
-
66
- string indent; // String to be used for indentation
67
- string linefeed; // String to be used for line feeds
68
- string input_path; // for relative paths in src-map
69
- string output_path; // for relative paths to the output
70
- bool source_comments; // for inline debug comments in css output
71
- Output_Style output_style; // output style for the generated css code
72
- string source_map_file; // path to source map file (enables feature)
73
- string source_map_root; // path for sourceRoot property (pass-through)
74
- bool source_map_embed; // embed in sourceMappingUrl (as data-url)
75
- bool source_map_contents; // insert included contents into source map
76
- bool omit_source_map_url; // disable source map comment in css output
77
- bool is_indented_syntax_src; // treat source string as sass
78
-
79
- // overload import calls
80
- vector<Sass_Import_Entry> import_stack;
81
-
82
- map<string, Color*> names_to_colors;
83
- map<int, string> colors_to_names;
84
-
85
- size_t precision; // precision for outputting fractional numbers
86
-
87
- KWD_ARG_SET(Data) {
88
- KWD_ARG(Data, struct Sass_Options*, c_options);
89
- KWD_ARG(Data, struct Sass_Compiler*, c_compiler);
90
- KWD_ARG(Data, const char*, source_c_str);
91
- KWD_ARG(Data, string, entry_point);
92
- KWD_ARG(Data, string, input_path);
93
- KWD_ARG(Data, string, output_path);
94
- KWD_ARG(Data, string, indent);
95
- KWD_ARG(Data, string, linefeed);
96
- KWD_ARG(Data, const char*, include_paths_c_str);
97
- KWD_ARG(Data, const char*, plugin_paths_c_str);
98
- // KWD_ARG(Data, const char**, include_paths_array);
99
- // KWD_ARG(Data, const char**, plugin_paths_array);
100
- KWD_ARG(Data, vector<string>, include_paths);
101
- KWD_ARG(Data, vector<string>, plugin_paths);
102
- KWD_ARG(Data, bool, source_comments);
103
- KWD_ARG(Data, Output_Style, output_style);
104
- KWD_ARG(Data, string, source_map_file);
105
- KWD_ARG(Data, string, source_map_root);
106
- KWD_ARG(Data, bool, omit_source_map_url);
107
- KWD_ARG(Data, bool, is_indented_syntax_src);
108
- KWD_ARG(Data, size_t, precision);
109
- KWD_ARG(Data, bool, source_map_embed);
110
- KWD_ARG(Data, bool, source_map_contents);
111
- };
112
-
113
- Context(Data);
114
- ~Context();
115
- static string get_cwd();
116
- void setup_color_map();
117
-
118
- Block* parse_file();
119
- Block* parse_string();
120
- void add_source(string, string, const char*);
121
-
122
- string add_file(const string& file);
123
- string add_file(const string& base, const string& file);
124
-
125
-
126
- // allow to optionally overwrite the input path
127
- // default argument for input_path is string("stdin")
128
- // usefull to influence the source-map generating etc.
129
- char* compile_file();
130
- char* compile_string();
131
- char* compile_block(Block* root);
132
- char* generate_source_map();
133
-
134
- vector<string> get_included_files(size_t skip = 0);
135
-
136
- private:
137
- void collect_plugin_paths(const char* paths_str);
138
- void collect_plugin_paths(const char** paths_array);
139
- void collect_include_paths(const char* paths_str);
140
- void collect_include_paths(const char** paths_array);
141
- string format_source_mapping_url(const string& file);
142
-
143
- string cwd;
144
- Plugins plugins;
145
-
146
- // void register_built_in_functions(Env* env);
147
- // void register_function(Signature sig, Native_Function f, Env* env);
148
- // void register_function(Signature sig, Native_Function f, size_t arity, Env* env);
149
- // void register_overload_stub(string name, Env* env);
150
-
151
- public:
152
- Subset_Map<string, pair<Complex_Selector*, Compound_Selector*> > subset_map;
153
- };
154
-
155
- }
156
-
157
- #endif