sassc 1.8.0.pre2 → 1.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -2
  3. data/ext/libsass/contrib/plugin.cpp +4 -1
  4. data/ext/libsass/docs/README.md +20 -0
  5. data/ext/libsass/docs/api-context-example.md +45 -0
  6. data/ext/libsass/docs/api-context-internal.md +152 -0
  7. data/ext/libsass/docs/api-context.md +268 -0
  8. data/ext/libsass/docs/api-doc.md +160 -0
  9. data/ext/libsass/docs/api-function-example.md +58 -0
  10. data/ext/libsass/docs/api-function-internal.md +8 -0
  11. data/ext/libsass/docs/api-function.md +48 -0
  12. data/ext/libsass/docs/api-importer-example.md +1345 -0
  13. data/ext/libsass/docs/api-importer-internal.md +15 -0
  14. data/ext/libsass/docs/api-importer.md +84 -0
  15. data/ext/libsass/docs/api-value-example.md +0 -0
  16. data/ext/libsass/docs/api-value-internal.md +76 -0
  17. data/ext/libsass/docs/api-value.md +125 -0
  18. data/ext/libsass/docs/build-on-darwin.md +27 -0
  19. data/ext/libsass/docs/build-on-gentoo.md +55 -0
  20. data/ext/libsass/docs/build-on-windows.md +139 -0
  21. data/ext/libsass/docs/build-shared-library.md +35 -0
  22. data/ext/libsass/docs/build-with-autotools.md +68 -0
  23. data/ext/libsass/docs/build-with-makefiles.md +50 -0
  24. data/ext/libsass/docs/build-with-mingw.md +107 -0
  25. data/ext/libsass/docs/build-with-visual-studio.md +90 -0
  26. data/ext/libsass/docs/build.md +97 -0
  27. data/ext/libsass/docs/compatibility-plan.md +48 -0
  28. data/ext/libsass/docs/contributing.md +17 -0
  29. data/ext/libsass/docs/custom-functions-internal.md +120 -0
  30. data/ext/libsass/docs/implementations.md +49 -0
  31. data/ext/libsass/docs/plugins.go +47 -0
  32. data/ext/libsass/docs/setup-environment.md +68 -0
  33. data/ext/libsass/docs/source-map-internals.md +51 -0
  34. data/ext/libsass/docs/trace.md +26 -0
  35. data/ext/libsass/docs/triage.md +17 -0
  36. data/ext/libsass/docs/unicode.md +39 -0
  37. data/ext/libsass/include/sass/context.h +1 -0
  38. data/ext/libsass/include/sass/functions.h +1 -1
  39. data/ext/libsass/src/ast.cpp +12 -2
  40. data/ext/libsass/src/ast.hpp +10 -2
  41. data/ext/libsass/src/bind.cpp +0 -2
  42. data/ext/libsass/src/debug.hpp +4 -0
  43. data/ext/libsass/src/debugger.hpp +2 -1
  44. data/ext/libsass/src/emitter.cpp +2 -0
  45. data/ext/libsass/src/eval.cpp +5 -7
  46. data/ext/libsass/src/expand.cpp +8 -1
  47. data/ext/libsass/src/functions.cpp +19 -4
  48. data/ext/libsass/src/inspect.cpp +17 -0
  49. data/ext/libsass/src/json.cpp +1 -1
  50. data/ext/libsass/src/parser.cpp +10 -1
  51. data/ext/libsass/src/prelexer.cpp +1 -1
  52. data/ext/libsass/src/sass_context.cpp +1 -0
  53. data/ext/libsass/src/sass_values.cpp +1 -1
  54. data/lib/sassc/version.rb +1 -1
  55. data/test/native_test.rb +1 -1
  56. metadata +37 -4
@@ -0,0 +1,39 @@
1
+ LibSass currently expects all input to be utf8 encoded (and outputs only utf8), if you actually have any unicode characters at all. We do not support conversion between encodings, even if you declare it with a `@charset` rule. The text below was originally posted as an [issue](https://github.com/sass/libsass/issues/381) on the LibSass tracker.
2
+
3
+ ### [Declaring character encodings in CSS](http://www.w3.org/International/questions/qa-css-charset.en)
4
+
5
+ This [explains](http://www.w3.org/International/questions/qa-css-charset.en) how the character encoding of a css file is determined. Since we are only dealing with local files, we never have a HTTP header. So the precedence should be 'charset' rule, byte-order mark (BOM) or auto-detection (finally falling back to system default/UTF-8). This may not sound too hard to implement, but what about import rules? The CSS specs do not forbid the mixing of different encodings! I solved that by converting all files to UTF-8 internally. On writing there is an option to tell the tool what encoding it should be (UTF-8 by default). One can also define if it should write a BOM or not and if it should add the charset declaration.
6
+
7
+ Since my tool is written in perl, I have a lot of utilities at hand to deal with different unicode charsets. I'm pretty sure that most OSS uses [libiconv](https://www.gnu.org/software/libiconv/) to convert between different encodings. But I have now idea how easy/hard this would be to integrate platform independent (it seems doable).
8
+
9
+ ### Current status on LibSass unicode support
10
+
11
+ Currently LibSass seems to handle the common UTF-8 case pretty well. I believe it should correctly support all ASCII compatible encodings (like UTF-8 or Latin-1). If all includes use the same encoding, the output should be correct (in the same encoding). It should also handle unicode chars in [selectors, variable names and other identifiers](https://github.com/hcatlin/libsass/issues/244#issuecomment-34681227). This is true for all ASCII compatible encodings. So the main incompatible encodings (I'm aware of) are UTF-16/UTF-32 (which could be converted to UTF-8 with libiconv).
12
+
13
+ ### Current encoding auto detection
14
+
15
+ LibSass currently reads all kind of BOMs and will error out if it finds something it doesn't know how to handle! It seems that it throws away the optional UTF-8 BOM (if any is found). IMO it would be nice if users could configure that (also if a charset rule should be added to the output).
16
+
17
+ ### What is currently not supported
18
+
19
+ - Using non ASCII compatible encodings (like UTF-16)
20
+ - Using non ASCII characters in different encodings in different includes
21
+
22
+ ### What is missing to support the above cases
23
+
24
+ - A way to convert between encodings (like libiconv)
25
+ - Sniffing the charset inside the file (source is available)
26
+ - Handling the conversion on import (and export)
27
+ - Optional: Make output encoding configurable
28
+ - Optional: Add optional/mandatory BOM (configurable)
29
+
30
+ ### Low priority feature
31
+
32
+ I guess the current implementation should handle more than 99% of all real world use cases.
33
+ A) Unicode characters are still seldomly seen (as they can be written escaped)
34
+ B) It will still work if it's UTF-8 or in any of the most common known western ISO codepages.
35
+ Although I'm not sure how this applies to asian and other "exotic" codepages!
36
+
37
+ I guess the biggest Problem is to have libiconv (or some other) library as a dependency. Since it contains a lot of rules for the conversions, I see it as the only way to handle this correctly. Once that is sorted out it should be pretty much straight forward to implement the missing pieces (in parser.cpp - Parser::parse should return encoding and add Parser::sniff_charset, then convert the source byte stream to UTF-8).
38
+
39
+ I hope the statements above all hold true. Unicode is really not the easiest topic to wrap your head around. But since I did all the above recently in Perl, I wanted to document it here. Feel free to extend or criticize.
@@ -136,6 +136,7 @@ ADDAPI char** ADDCALL sass_context_take_included_files (struct Sass_Context* ctx
136
136
  // Getters for Sass_Compiler options
137
137
  ADDAPI enum Sass_Compiler_State ADDCALL sass_compiler_get_state(struct Sass_Compiler* compiler);
138
138
  ADDAPI struct Sass_Context* ADDCALL sass_compiler_get_context(struct Sass_Compiler* compiler);
139
+ ADDAPI struct Sass_Options* ADDCALL sass_compiler_get_options(struct Sass_Compiler* compiler);
139
140
  ADDAPI size_t ADDCALL sass_compiler_get_import_stack_size(struct Sass_Compiler* compiler);
140
141
  ADDAPI Sass_Import_Entry ADDCALL sass_compiler_get_last_import(struct Sass_Compiler* compiler);
141
142
  ADDAPI Sass_Import_Entry ADDCALL sass_compiler_get_import_entry(struct Sass_Compiler* compiler, size_t idx);
@@ -32,7 +32,7 @@ typedef struct Sass_Function (*Sass_Function_Entry);
32
32
  typedef struct Sass_Function* (*Sass_Function_List);
33
33
  // Typedef defining function signature and return type
34
34
  typedef union Sass_Value* (*Sass_Function_Fn)
35
- (const union Sass_Value*, Sass_Function_Entry cb, struct Sass_Options* options);
35
+ (const union Sass_Value*, Sass_Function_Entry cb, struct Sass_Compiler* compiler);
36
36
 
37
37
 
38
38
  // Creator for sass custom importer return argument list
@@ -235,6 +235,16 @@ namespace Sass {
235
235
  return this == &rhs;
236
236
  }
237
237
 
238
+ // Selector lists can be compared to comma lists
239
+ bool Selector_List::operator==(const Expression& rhs) const
240
+ {
241
+ // solve the double dispatch problem by using RTTI information via dynamic cast
242
+ if (const List* ls = dynamic_cast<const List*>(&rhs)) { return *this == *ls; }
243
+ if (const Selector* ls = dynamic_cast<const Selector*>(&rhs)) { return *this == *ls; }
244
+ // compare invalid (maybe we should error?)
245
+ return false;
246
+ }
247
+
238
248
  bool Selector_List::operator== (const Selector_List& rhs) const
239
249
  {
240
250
  // for array access
@@ -258,10 +268,10 @@ namespace Sass {
258
268
  // skip nulls
259
269
  if (!l) ++i;
260
270
  else if (!r) ++n;
261
- // do the check now
271
+ // do the check
262
272
  else if (*l != *r)
263
273
  { return false; }
264
- // advance now
274
+ // advance
265
275
  ++i; ++n;
266
276
  }
267
277
  // no mismatch
@@ -191,6 +191,7 @@ namespace Sass {
191
191
  T last() { return elements_.back(); }
192
192
  T first() { return elements_.front(); }
193
193
  T& operator[](size_t i) { return elements_[i]; }
194
+ virtual const T& at(size_t i) const { return elements_.at(i); }
194
195
  const T& operator[](size_t i) const { return elements_[i]; }
195
196
  Vectorized& operator<<(T element)
196
197
  {
@@ -2117,7 +2118,10 @@ namespace Sass {
2117
2118
  Compound_Selector* h = 0,
2118
2119
  Complex_Selector* t = 0,
2119
2120
  String* r = 0)
2120
- : Selector(pstate), combinator_(c), head_(h), tail_(t), reference_(r)
2121
+ : Selector(pstate),
2122
+ combinator_(c),
2123
+ head_(h), tail_(t),
2124
+ reference_(r)
2121
2125
  {
2122
2126
  if ((h && h->has_reference()) || (t && t->has_reference())) has_reference(true);
2123
2127
  if ((h && h->has_placeholder()) || (t && t->has_placeholder())) has_placeholder(true);
@@ -2129,9 +2133,10 @@ namespace Sass {
2129
2133
  if ((!head_ || !head_->length() || head_->is_empty_reference()) &&
2130
2134
  combinator() == Combinator::ANCESTOR_OF)
2131
2135
  {
2136
+ if (!tail_) return 0;
2132
2137
  tail_->has_line_feed_ = this->has_line_feed_;
2133
2138
  // tail_->has_line_break_ = this->has_line_break_;
2134
- return tail_ ? tail_->skip_empty_reference() : 0;
2139
+ return tail_->skip_empty_reference();
2135
2140
  }
2136
2141
  return this;
2137
2142
  }
@@ -2251,6 +2256,7 @@ namespace Sass {
2251
2256
  Selector_List(ParserState pstate, size_t s = 0)
2252
2257
  : Selector(pstate), Vectorized<Complex_Selector*>(s), wspace_(0)
2253
2258
  { }
2259
+ std::string type() { return "list"; }
2254
2260
  // remove parent selector references
2255
2261
  // basically unwraps parsed selectors
2256
2262
  void remove_parent_selectors();
@@ -2276,6 +2282,8 @@ namespace Sass {
2276
2282
  Selector_List* cloneFully(Context&) const; // clones Compound_Selector*s
2277
2283
  virtual bool operator==(const Selector& rhs) const;
2278
2284
  virtual bool operator==(const Selector_List& rhs) const;
2285
+ // Selector Lists can be compared to comma lists
2286
+ virtual bool operator==(const Expression& rhs) const;
2279
2287
  ATTACH_OPERATIONS()
2280
2288
  };
2281
2289
 
@@ -39,8 +39,6 @@ namespace Sass {
39
39
  size_t ia = 0, LA = as->length();
40
40
  while (ia < LA) {
41
41
  Argument* a = (*as)[ia];
42
- // this is only needed for selectors
43
- a->value(a->value()->perform(&listize));
44
42
  if (ip >= LP) {
45
43
  // skip empty rest arguments
46
44
  if (a->is_rest_argument()) {
@@ -3,6 +3,10 @@
3
3
 
4
4
  #include <stdint.h>
5
5
 
6
+ #ifndef UINT32_MAX
7
+ #define UINT32_MAX 0xffffffffU
8
+ #endif
9
+
6
10
  enum dbg_lvl_t : uint32_t {
7
11
  NONE = 0,
8
12
  TRIM = 1,
@@ -71,7 +71,8 @@ inline void debug_ast(AST_Node* node, std::string ind, Env* env)
71
71
  std::cerr << " (" << pstate_source_position(node) << ")";
72
72
  std::cerr << " " << root_block->tabs();
73
73
  std::cerr << std::endl;
74
- if (root_block->block()) for(auto i : root_block->block()->elements()) { debug_ast(i, ind + " ", env); }
74
+ debug_ast(root_block->expression(), ind + ":", env);
75
+ debug_ast(root_block->block(), ind + " ", env);
75
76
  } else if (dynamic_cast<Selector_List*>(node)) {
76
77
  Selector_List* selector = dynamic_cast<Selector_List*>(node);
77
78
  std::cerr << ind << "Selector_List " << selector;
@@ -146,6 +146,7 @@ namespace Sass {
146
146
  {
147
147
  if (output_style() == COMPRESSED) return;
148
148
  if (output_style() == COMPACT) return;
149
+ if (in_declaration && in_comma_array) return;
149
150
  if (scheduled_linefeed && indentation)
150
151
  scheduled_linefeed = 1;
151
152
  std::string indent = "";
@@ -208,6 +209,7 @@ namespace Sass {
208
209
 
209
210
  void Emitter::append_optional_linefeed()
210
211
  {
212
+ if (in_declaration && in_comma_array) return;
211
213
  if (output_style() == COMPACT) {
212
214
  append_mandatory_space();
213
215
  } else {
@@ -258,7 +258,6 @@ namespace Sass {
258
258
  }
259
259
  }
260
260
  else {
261
- bool arglist = list->is_arglist();
262
261
  for (size_t i = 0, L = list->length(); i < L; ++i) {
263
262
  Expression* e = (*list)[i];
264
263
  // unwrap value if the expression is an argument
@@ -267,7 +266,6 @@ namespace Sass {
267
266
  if (List* scalars = dynamic_cast<List*>(e)) {
268
267
  if (variables.size() == 1) {
269
268
  Expression* var = scalars;
270
- if (arglist) var = (*scalars)[0];
271
269
  env->set_local(variables[0], var);
272
270
  } else {
273
271
  for (size_t j = 0, K = variables.size(); j < K; ++j) {
@@ -332,7 +330,7 @@ namespace Sass {
332
330
  To_C to_c;
333
331
  union Sass_Value* c_args = sass_make_list(1, SASS_COMMA);
334
332
  sass_list_set_value(c_args, 0, message->perform(&to_c));
335
- union Sass_Value* c_val = c_func(c_args, c_function, ctx.c_options);
333
+ union Sass_Value* c_val = c_func(c_args, c_function, ctx.c_compiler);
336
334
  sass_delete_value(c_args);
337
335
  sass_delete_value(c_val);
338
336
  return 0;
@@ -365,7 +363,7 @@ namespace Sass {
365
363
  To_C to_c;
366
364
  union Sass_Value* c_args = sass_make_list(1, SASS_COMMA);
367
365
  sass_list_set_value(c_args, 0, message->perform(&to_c));
368
- union Sass_Value* c_val = c_func(c_args, c_function, ctx.c_options);
366
+ union Sass_Value* c_val = c_func(c_args, c_function, ctx.c_compiler);
369
367
  sass_delete_value(c_args);
370
368
  sass_delete_value(c_val);
371
369
  return 0;
@@ -395,7 +393,7 @@ namespace Sass {
395
393
  To_C to_c;
396
394
  union Sass_Value* c_args = sass_make_list(1, SASS_COMMA);
397
395
  sass_list_set_value(c_args, 0, message->perform(&to_c));
398
- union Sass_Value* c_val = c_func(c_args, c_function, ctx.c_options);
396
+ union Sass_Value* c_val = c_func(c_args, c_function, ctx.c_compiler);
399
397
  sass_delete_value(c_args);
400
398
  sass_delete_value(c_val);
401
399
  return 0;
@@ -690,7 +688,7 @@ namespace Sass {
690
688
  Expression* arg = static_cast<Expression*>(node);
691
689
  sass_list_set_value(c_args, i, arg->perform(&to_c));
692
690
  }
693
- union Sass_Value* c_val = c_func(c_args, c_function, ctx.c_options);
691
+ union Sass_Value* c_val = c_func(c_args, c_function, ctx.c_compiler);
694
692
  if (sass_value_get_tag(c_val) == SASS_ERROR) {
695
693
  error("error in C function " + c->name() + ": " + sass_error_get_message(c_val), c->pstate(), backtrace());
696
694
  } else if (sass_value_get_tag(c_val) == SASS_WARNING) {
@@ -763,7 +761,7 @@ namespace Sass {
763
761
  value = SASS_MEMORY_NEW(ctx.mem, Null, value->pstate());
764
762
  }
765
763
  else if (value->concrete_type() == Expression::SELECTOR) {
766
- value = value->perform(this)->perform(&listize);
764
+ value = value->perform(this); // ->perform(&listize);
767
765
  }
768
766
 
769
767
  // std::cerr << "\ttype is now: " << typeid(*value).name() << std::endl << std::endl;
@@ -625,11 +625,18 @@ namespace Sass {
625
625
  Env* env = environment();
626
626
  // convert @content directives into mixin calls to the underlying thunk
627
627
  if (!env->has("@content[m]")) return 0;
628
+ if (block_stack.back()->is_root()) {
629
+ selector_stack.push_back(0);
630
+ }
628
631
  Mixin_Call* call = SASS_MEMORY_NEW(ctx.mem, Mixin_Call,
629
632
  c->pstate(),
630
633
  "@content",
631
634
  SASS_MEMORY_NEW(ctx.mem, Arguments, c->pstate()));
632
- return call->perform(this);
635
+ Statement* stm = call->perform(this);
636
+ if (block_stack.back()->is_root()) {
637
+ selector_stack.pop_back();
638
+ }
639
+ return stm;
633
640
  }
634
641
 
635
642
  // produce an error if something is not implemented
@@ -1188,12 +1188,13 @@ namespace Sass {
1188
1188
  Signature length_sig = "length($list)";
1189
1189
  BUILT_IN(length)
1190
1190
  {
1191
+ if (Selector_List* sl = dynamic_cast<Selector_List*>(env["$list"])) {
1192
+ return SASS_MEMORY_NEW(ctx.mem, Number, pstate, (double)sl->length());
1193
+ }
1191
1194
  Expression* v = ARG("$list", Expression);
1192
1195
  if (v->concrete_type() == Expression::MAP) {
1193
1196
  Map* map = dynamic_cast<Map*>(env["$list"]);
1194
- return SASS_MEMORY_NEW(ctx.mem, Number,
1195
- pstate,
1196
- (double)(map ? map->length() : 1));
1197
+ return SASS_MEMORY_NEW(ctx.mem, Number, pstate, (double)(map ? map->length() : 1));
1197
1198
  }
1198
1199
  if (v->concrete_type() == Expression::SELECTOR) {
1199
1200
  if (Compound_Selector* h = dynamic_cast<Compound_Selector*>(v)) {
@@ -1214,9 +1215,19 @@ namespace Sass {
1214
1215
  Signature nth_sig = "nth($list, $n)";
1215
1216
  BUILT_IN(nth)
1216
1217
  {
1218
+ Number* n = ARG("$n", Number);
1217
1219
  Map* m = dynamic_cast<Map*>(env["$list"]);
1220
+ if (Selector_List* sl = dynamic_cast<Selector_List*>(env["$list"])) {
1221
+ size_t len = m ? m->length() : sl->length();
1222
+ bool empty = m ? m->empty() : sl->empty();
1223
+ if (empty) error("argument `$list` of `" + std::string(sig) + "` must not be empty", pstate);
1224
+ double index = std::floor(n->value() < 0 ? len + n->value() : n->value() - 1);
1225
+ if (index < 0 || index > len - 1) error("index out of bounds for `" + std::string(sig) + "`", pstate);
1226
+ // return (*sl)[static_cast<int>(index)];
1227
+ Listize listize(ctx);
1228
+ return (*sl)[static_cast<int>(index)]->perform(&listize);
1229
+ }
1218
1230
  List* l = dynamic_cast<List*>(env["$list"]);
1219
- Number* n = ARG("$n", Number);
1220
1231
  if (n->value() == 0) error("argument `$n` of `" + std::string(sig) + "` must be non-zero", pstate);
1221
1232
  // if the argument isn't a list, then wrap it in a singleton list
1222
1233
  if (!m && !l) {
@@ -1307,6 +1318,10 @@ namespace Sass {
1307
1318
  {
1308
1319
  List* l = dynamic_cast<List*>(env["$list"]);
1309
1320
  Expression* v = ARG("$val", Expression);
1321
+ if (Selector_List* sl = dynamic_cast<Selector_List*>(env["$list"])) {
1322
+ Listize listize(ctx);
1323
+ l = dynamic_cast<List*>(sl->perform(&listize));
1324
+ }
1310
1325
  String_Constant* sep = ARG("$separator", String_Constant);
1311
1326
  if (!l) {
1312
1327
  l = SASS_MEMORY_NEW(ctx.mem, List, pstate, 1);
@@ -738,7 +738,10 @@ namespace Sass {
738
738
  in_wrapped = true;
739
739
  append_token(s->name(), s);
740
740
  append_string("(");
741
+ bool was_comma_array = in_comma_array;
742
+ in_comma_array = false;
741
743
  s->selector()->perform(this);
744
+ in_comma_array = was_comma_array;
742
745
  append_string(")");
743
746
  in_wrapped = was;
744
747
  }
@@ -816,6 +819,14 @@ namespace Sass {
816
819
  void Inspect::operator()(Selector_List* g)
817
820
  {
818
821
  if (g->empty()) return;
822
+
823
+ bool was_comma_array = in_comma_array;
824
+ if (!in_declaration && in_comma_array) {
825
+ append_string("(");
826
+ }
827
+
828
+ if (in_declaration) in_comma_array = true;
829
+
819
830
  for (size_t i = 0, L = g->length(); i < L; ++i) {
820
831
  if (!in_wrapped && i == 0) append_indentation();
821
832
  if ((*g)[i] == 0) continue;
@@ -825,6 +836,12 @@ namespace Sass {
825
836
  append_comma_separator();
826
837
  }
827
838
  }
839
+
840
+ in_comma_array = was_comma_array;
841
+ if (!in_declaration && in_comma_array) {
842
+ append_string(")");
843
+ }
844
+
828
845
  }
829
846
 
830
847
  void Inspect::fallback_impl(AST_Node* n)
@@ -802,7 +802,7 @@ failure:
802
802
  bool parse_string(const char **sp, char **out)
803
803
  {
804
804
  const char *s = *sp;
805
- SB sb;
805
+ SB sb = { 0, 0, 0};
806
806
  char throwaway_buffer[4];
807
807
  /* enough space for a UTF-8 character */
808
808
  char *b;
@@ -2331,7 +2331,7 @@ namespace Sass {
2331
2331
  // match in one big "regex"
2332
2332
  if (const char* q =
2333
2333
  peek <
2334
- one_plus <
2334
+ non_greedy <
2335
2335
  alternatives <
2336
2336
  // consume whitespace
2337
2337
  block_comment, spaces,
@@ -2344,10 +2344,19 @@ namespace Sass {
2344
2344
  parenthese_scope,
2345
2345
  interpolant
2346
2346
  >
2347
+ >,
2348
+ sequence <
2349
+ optional_spaces,
2350
+ alternatives <
2351
+ exactly<'{'>,
2352
+ exactly<'}'>,
2353
+ exactly<';'>
2354
+ >
2347
2355
  >
2348
2356
  >
2349
2357
  >(p)
2350
2358
  ) {
2359
+ if (p == q) return rv;
2351
2360
  while (p < q) {
2352
2361
  // did we have interpolations?
2353
2362
  if (*p == '#' && *(p+1) == '{') {
@@ -1070,7 +1070,7 @@ namespace Sass {
1070
1070
  >,
1071
1071
  static_component
1072
1072
  > >,
1073
- optional_css_whitespace,
1073
+ zero_plus < spaces >,
1074
1074
  alternatives< exactly<';'>, exactly<'}'> >
1075
1075
  >(src);
1076
1076
  }
@@ -806,6 +806,7 @@ extern "C" {
806
806
  // Getters for Sass_Compiler options (get conected sass context)
807
807
  enum Sass_Compiler_State ADDCALL sass_compiler_get_state(struct Sass_Compiler* compiler) { return compiler->state; }
808
808
  struct Sass_Context* ADDCALL sass_compiler_get_context(struct Sass_Compiler* compiler) { return compiler->c_ctx; }
809
+ struct Sass_Options* ADDCALL sass_compiler_get_options(struct Sass_Compiler* compiler) { return compiler->c_ctx; }
809
810
  // Getters for Sass_Compiler options (query import stack)
810
811
  size_t ADDCALL sass_compiler_get_import_stack_size(struct Sass_Compiler* compiler) { return compiler->cpp_ctx->import_stack.size(); }
811
812
  Sass_Import_Entry ADDCALL sass_compiler_get_last_import(struct Sass_Compiler* compiler) { return compiler->cpp_ctx->import_stack.back(); }
@@ -210,7 +210,7 @@ extern "C" {
210
210
  v->list.tag = SASS_LIST;
211
211
  v->list.length = len;
212
212
  v->list.separator = sep;
213
- v->list.values = (union Sass_Value**) calloc(len, sizeof(union Sass_Value));
213
+ v->list.values = (union Sass_Value**) calloc(len, sizeof(union Sass_Value*));
214
214
  if (v->list.values == 0) { free(v); return 0; }
215
215
  return v;
216
216
  }
@@ -1,3 +1,3 @@
1
1
  module SassC
2
- VERSION = "1.8.0.pre2"
2
+ VERSION = "1.8.0"
3
3
  end
@@ -9,7 +9,7 @@ module SassC
9
9
 
10
10
  class General < MiniTest::Test
11
11
  def test_it_reports_the_libsass_version
12
- assert_equal "3.3.0-beta3", Native.version
12
+ assert_equal "3.3.0", Native.version
13
13
  end
14
14
  end
15
15
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sassc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0.pre2
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Boland
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-14 00:00:00.000000000 Z
11
+ date: 2015-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -154,6 +154,39 @@ files:
154
154
  - ext/libsass/configure.ac
155
155
  - ext/libsass/contrib/libsass.spec
156
156
  - ext/libsass/contrib/plugin.cpp
157
+ - ext/libsass/docs/README.md
158
+ - ext/libsass/docs/api-context-example.md
159
+ - ext/libsass/docs/api-context-internal.md
160
+ - ext/libsass/docs/api-context.md
161
+ - ext/libsass/docs/api-doc.md
162
+ - ext/libsass/docs/api-function-example.md
163
+ - ext/libsass/docs/api-function-internal.md
164
+ - ext/libsass/docs/api-function.md
165
+ - ext/libsass/docs/api-importer-example.md
166
+ - ext/libsass/docs/api-importer-internal.md
167
+ - ext/libsass/docs/api-importer.md
168
+ - ext/libsass/docs/api-value-example.md
169
+ - ext/libsass/docs/api-value-internal.md
170
+ - ext/libsass/docs/api-value.md
171
+ - ext/libsass/docs/build-on-darwin.md
172
+ - ext/libsass/docs/build-on-gentoo.md
173
+ - ext/libsass/docs/build-on-windows.md
174
+ - ext/libsass/docs/build-shared-library.md
175
+ - ext/libsass/docs/build-with-autotools.md
176
+ - ext/libsass/docs/build-with-makefiles.md
177
+ - ext/libsass/docs/build-with-mingw.md
178
+ - ext/libsass/docs/build-with-visual-studio.md
179
+ - ext/libsass/docs/build.md
180
+ - ext/libsass/docs/compatibility-plan.md
181
+ - ext/libsass/docs/contributing.md
182
+ - ext/libsass/docs/custom-functions-internal.md
183
+ - ext/libsass/docs/implementations.md
184
+ - ext/libsass/docs/plugins.go
185
+ - ext/libsass/docs/setup-environment.md
186
+ - ext/libsass/docs/source-map-internals.md
187
+ - ext/libsass/docs/trace.md
188
+ - ext/libsass/docs/triage.md
189
+ - ext/libsass/docs/unicode.md
157
190
  - ext/libsass/extconf.rb
158
191
  - ext/libsass/include/sass.h
159
192
  - ext/libsass/include/sass/base.h
@@ -339,9 +372,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
339
372
  version: '0'
340
373
  required_rubygems_version: !ruby/object:Gem::Requirement
341
374
  requirements:
342
- - - ">"
375
+ - - ">="
343
376
  - !ruby/object:Gem::Version
344
- version: 1.3.1
377
+ version: '0'
345
378
  requirements: []
346
379
  rubyforge_project:
347
380
  rubygems_version: 2.2.2