sassc 2.2.1 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/CHANGELOG.md +18 -0
- data/Rakefile +1 -3
- data/ext/extconf.rb +13 -5
- data/ext/libsass/VERSION +1 -1
- data/ext/libsass/include/sass/base.h +2 -1
- data/ext/libsass/include/sass/context.h +4 -0
- data/ext/libsass/src/MurmurHash2.hpp +91 -0
- data/ext/libsass/src/ast.cpp +158 -168
- data/ext/libsass/src/ast.hpp +389 -230
- data/ext/libsass/src/ast_def_macros.hpp +18 -10
- data/ext/libsass/src/ast_fwd_decl.cpp +4 -3
- data/ext/libsass/src/ast_fwd_decl.hpp +98 -165
- data/ext/libsass/src/ast_helpers.hpp +292 -0
- data/ext/libsass/src/ast_sel_cmp.cpp +219 -732
- data/ext/libsass/src/ast_sel_super.cpp +539 -0
- data/ext/libsass/src/ast_sel_unify.cpp +207 -212
- data/ext/libsass/src/ast_sel_weave.cpp +616 -0
- data/ext/libsass/src/ast_selectors.cpp +594 -1026
- data/ext/libsass/src/ast_selectors.hpp +339 -385
- data/ext/libsass/src/ast_supports.cpp +36 -52
- data/ext/libsass/src/ast_supports.hpp +29 -29
- data/ext/libsass/src/ast_values.cpp +271 -84
- data/ext/libsass/src/ast_values.hpp +116 -107
- data/ext/libsass/src/backtrace.cpp +9 -9
- data/ext/libsass/src/backtrace.hpp +5 -5
- data/ext/libsass/src/base64vlq.cpp +2 -2
- data/ext/libsass/src/base64vlq.hpp +1 -1
- data/ext/libsass/src/bind.cpp +18 -18
- data/ext/libsass/src/bind.hpp +1 -1
- data/ext/libsass/src/c2ast.cpp +3 -3
- data/ext/libsass/src/c2ast.hpp +1 -1
- data/ext/libsass/src/cencode.c +4 -6
- data/ext/libsass/src/check_nesting.cpp +40 -41
- data/ext/libsass/src/check_nesting.hpp +6 -2
- data/ext/libsass/src/color_maps.cpp +14 -13
- data/ext/libsass/src/color_maps.hpp +1 -9
- data/ext/libsass/src/constants.cpp +5 -0
- data/ext/libsass/src/constants.hpp +6 -0
- data/ext/libsass/src/context.cpp +92 -119
- data/ext/libsass/src/context.hpp +41 -53
- data/ext/libsass/src/cssize.cpp +66 -149
- data/ext/libsass/src/cssize.hpp +17 -23
- data/ext/libsass/src/dart_helpers.hpp +199 -0
- data/ext/libsass/src/debugger.hpp +451 -295
- data/ext/libsass/src/emitter.cpp +15 -16
- data/ext/libsass/src/emitter.hpp +10 -12
- data/ext/libsass/src/environment.cpp +27 -27
- data/ext/libsass/src/environment.hpp +29 -24
- data/ext/libsass/src/error_handling.cpp +62 -41
- data/ext/libsass/src/error_handling.hpp +61 -51
- data/ext/libsass/src/eval.cpp +167 -281
- data/ext/libsass/src/eval.hpp +27 -29
- data/ext/libsass/src/eval_selectors.cpp +75 -0
- data/ext/libsass/src/expand.cpp +275 -222
- data/ext/libsass/src/expand.hpp +36 -16
- data/ext/libsass/src/extender.cpp +1188 -0
- data/ext/libsass/src/extender.hpp +399 -0
- data/ext/libsass/src/extension.cpp +43 -0
- data/ext/libsass/src/extension.hpp +89 -0
- data/ext/libsass/src/file.cpp +81 -72
- data/ext/libsass/src/file.hpp +28 -37
- data/ext/libsass/src/fn_colors.cpp +20 -18
- data/ext/libsass/src/fn_lists.cpp +30 -29
- data/ext/libsass/src/fn_maps.cpp +3 -3
- data/ext/libsass/src/fn_miscs.cpp +34 -46
- data/ext/libsass/src/fn_numbers.cpp +20 -13
- data/ext/libsass/src/fn_selectors.cpp +98 -128
- data/ext/libsass/src/fn_strings.cpp +47 -33
- data/ext/libsass/src/fn_utils.cpp +31 -29
- data/ext/libsass/src/fn_utils.hpp +17 -11
- data/ext/libsass/src/inspect.cpp +186 -148
- data/ext/libsass/src/inspect.hpp +31 -29
- data/ext/libsass/src/lexer.cpp +20 -82
- data/ext/libsass/src/lexer.hpp +5 -16
- data/ext/libsass/src/listize.cpp +23 -37
- data/ext/libsass/src/listize.hpp +8 -9
- data/ext/libsass/src/mapping.hpp +1 -0
- data/ext/libsass/src/memory/allocator.cpp +48 -0
- data/ext/libsass/src/memory/allocator.hpp +138 -0
- data/ext/libsass/src/memory/config.hpp +20 -0
- data/ext/libsass/src/memory/memory_pool.hpp +186 -0
- data/ext/libsass/src/memory/{SharedPtr.cpp → shared_ptr.cpp} +2 -2
- data/ext/libsass/src/memory/{SharedPtr.hpp → shared_ptr.hpp} +55 -9
- data/ext/libsass/src/memory.hpp +12 -0
- data/ext/libsass/src/operation.hpp +71 -61
- data/ext/libsass/src/operators.cpp +19 -18
- data/ext/libsass/src/operators.hpp +11 -11
- data/ext/libsass/src/ordered_map.hpp +112 -0
- data/ext/libsass/src/output.cpp +45 -64
- data/ext/libsass/src/output.hpp +6 -6
- data/ext/libsass/src/parser.cpp +512 -700
- data/ext/libsass/src/parser.hpp +89 -97
- data/ext/libsass/src/parser_selectors.cpp +189 -0
- data/ext/libsass/src/permutate.hpp +164 -0
- data/ext/libsass/src/plugins.cpp +7 -7
- data/ext/libsass/src/plugins.hpp +8 -8
- data/ext/libsass/src/position.cpp +7 -26
- data/ext/libsass/src/position.hpp +44 -21
- data/ext/libsass/src/prelexer.cpp +6 -6
- data/ext/libsass/src/remove_placeholders.cpp +55 -56
- data/ext/libsass/src/remove_placeholders.hpp +21 -18
- data/ext/libsass/src/sass.cpp +16 -15
- data/ext/libsass/src/sass.hpp +10 -5
- data/ext/libsass/src/sass2scss.cpp +4 -4
- data/ext/libsass/src/sass_context.cpp +91 -122
- data/ext/libsass/src/sass_context.hpp +2 -2
- data/ext/libsass/src/sass_functions.cpp +1 -1
- data/ext/libsass/src/sass_values.cpp +8 -11
- data/ext/libsass/src/settings.hpp +19 -0
- data/ext/libsass/src/source.cpp +69 -0
- data/ext/libsass/src/source.hpp +95 -0
- data/ext/libsass/src/source_data.hpp +32 -0
- data/ext/libsass/src/source_map.cpp +22 -18
- data/ext/libsass/src/source_map.hpp +12 -9
- data/ext/libsass/src/stylesheet.cpp +22 -0
- data/ext/libsass/src/stylesheet.hpp +57 -0
- data/ext/libsass/src/to_value.cpp +2 -2
- data/ext/libsass/src/to_value.hpp +1 -1
- data/ext/libsass/src/units.cpp +24 -22
- data/ext/libsass/src/units.hpp +8 -8
- data/ext/libsass/src/utf8_string.cpp +9 -10
- data/ext/libsass/src/utf8_string.hpp +7 -6
- data/ext/libsass/src/util.cpp +48 -50
- data/ext/libsass/src/util.hpp +20 -21
- data/ext/libsass/src/util_string.cpp +111 -61
- data/ext/libsass/src/util_string.hpp +62 -8
- data/ext/libsass/src/values.cpp +12 -12
- data/lib/sassc/engine.rb +5 -3
- data/lib/sassc/functions_handler.rb +8 -8
- data/lib/sassc/native.rb +4 -6
- data/lib/sassc/script.rb +4 -4
- data/lib/sassc/version.rb +1 -1
- data/test/functions_test.rb +18 -1
- data/test/native_test.rb +4 -4
- metadata +29 -15
- data/ext/libsass/src/extend.cpp +0 -2132
- data/ext/libsass/src/extend.hpp +0 -86
- data/ext/libsass/src/node.cpp +0 -322
- data/ext/libsass/src/node.hpp +0 -118
- data/ext/libsass/src/paths.hpp +0 -71
- data/ext/libsass/src/sass_util.cpp +0 -152
- data/ext/libsass/src/sass_util.hpp +0 -256
- data/ext/libsass/src/subset_map.cpp +0 -58
- data/ext/libsass/src/subset_map.hpp +0 -76
- data/lib/sassc/native/lib_c.rb +0 -21
@@ -13,13 +13,13 @@ namespace Sass {
|
|
13
13
|
|
14
14
|
namespace Exception {
|
15
15
|
|
16
|
-
Base::Base(
|
17
|
-
: std::runtime_error(msg), msg(msg),
|
16
|
+
Base::Base(SourceSpan pstate, sass::string msg, Backtraces traces)
|
17
|
+
: std::runtime_error(msg.c_str()), msg(msg),
|
18
18
|
prefix("Error"), pstate(pstate), traces(traces)
|
19
19
|
{ }
|
20
20
|
|
21
|
-
InvalidSass::InvalidSass(
|
22
|
-
: Base(pstate, msg, traces)
|
21
|
+
InvalidSass::InvalidSass(SourceSpan pstate, Backtraces traces, sass::string msg)
|
22
|
+
: Base(pstate, msg, traces)
|
23
23
|
{ }
|
24
24
|
|
25
25
|
|
@@ -31,14 +31,14 @@ namespace Sass {
|
|
31
31
|
"\"" + parent->to_string(Sass_Inspect_Options()) + "\"";
|
32
32
|
}
|
33
33
|
|
34
|
-
InvalidVarKwdType::InvalidVarKwdType(
|
34
|
+
InvalidVarKwdType::InvalidVarKwdType(SourceSpan pstate, Backtraces traces, sass::string name, const Argument* arg)
|
35
35
|
: Base(pstate, def_msg, traces), name(name), arg(arg)
|
36
36
|
{
|
37
37
|
msg = "Variable keyword argument map must have string keys.\n" +
|
38
38
|
name + " is not a string in " + arg->to_string() + ".";
|
39
39
|
}
|
40
40
|
|
41
|
-
InvalidArgumentType::InvalidArgumentType(
|
41
|
+
InvalidArgumentType::InvalidArgumentType(SourceSpan pstate, Backtraces traces, sass::string fn, sass::string arg, sass::string type, const Value* value)
|
42
42
|
: Base(pstate, def_msg, traces), fn(fn), arg(arg), type(type), value(value)
|
43
43
|
{
|
44
44
|
msg = arg + ": \"";
|
@@ -46,17 +46,17 @@ namespace Sass {
|
|
46
46
|
msg += "\" is not a " + type + " for `" + fn + "'";
|
47
47
|
}
|
48
48
|
|
49
|
-
MissingArgument::MissingArgument(
|
49
|
+
MissingArgument::MissingArgument(SourceSpan pstate, Backtraces traces, sass::string fn, sass::string arg, sass::string fntype)
|
50
50
|
: Base(pstate, def_msg, traces), fn(fn), arg(arg), fntype(fntype)
|
51
51
|
{
|
52
52
|
msg = fntype + " " + fn + " is missing argument " + arg + ".";
|
53
53
|
}
|
54
54
|
|
55
|
-
InvalidSyntax::InvalidSyntax(
|
55
|
+
InvalidSyntax::InvalidSyntax(SourceSpan pstate, Backtraces traces, sass::string msg)
|
56
56
|
: Base(pstate, msg, traces)
|
57
57
|
{ }
|
58
58
|
|
59
|
-
NestingLimitError::NestingLimitError(
|
59
|
+
NestingLimitError::NestingLimitError(SourceSpan pstate, Backtraces traces, sass::string msg)
|
60
60
|
: Base(pstate, msg, traces)
|
61
61
|
{ }
|
62
62
|
|
@@ -66,7 +66,7 @@ namespace Sass {
|
|
66
66
|
msg = "Duplicate key " + dup.get_duplicate_key()->inspect() + " in map (" + org.inspect() + ").";
|
67
67
|
}
|
68
68
|
|
69
|
-
TypeMismatch::TypeMismatch(Backtraces traces, const Expression& var, const
|
69
|
+
TypeMismatch::TypeMismatch(Backtraces traces, const Expression& var, const sass::string type)
|
70
70
|
: Base(var.pstate(), def_msg, traces), var(var), type(type)
|
71
71
|
{
|
72
72
|
msg = var.to_string() + " is not an " + type + ".";
|
@@ -91,7 +91,7 @@ namespace Sass {
|
|
91
91
|
|
92
92
|
IncompatibleUnits::IncompatibleUnits(const UnitType lhs, const UnitType rhs)
|
93
93
|
{
|
94
|
-
msg =
|
94
|
+
msg = sass::string("Incompatible units: '") + unit_to_string(rhs) + "' and '" + unit_to_string(lhs) + "'.";
|
95
95
|
}
|
96
96
|
|
97
97
|
AlphaChannelsNotEqual::AlphaChannelsNotEqual(const Expression* lhs, const Expression* rhs, enum Sass_OP op)
|
@@ -125,58 +125,79 @@ namespace Sass {
|
|
125
125
|
msg = def_op_null_msg + ": \"" + lhs->inspect() + " " + sass_op_to_name(op) + " " + rhs->inspect() + "\".";
|
126
126
|
}
|
127
127
|
|
128
|
-
SassValueError::SassValueError(Backtraces traces,
|
128
|
+
SassValueError::SassValueError(Backtraces traces, SourceSpan pstate, OperationError& err)
|
129
129
|
: Base(pstate, err.what(), traces)
|
130
130
|
{
|
131
131
|
msg = err.what();
|
132
132
|
prefix = err.errtype();
|
133
133
|
}
|
134
134
|
|
135
|
+
TopLevelParent::TopLevelParent(Backtraces traces, SourceSpan pstate)
|
136
|
+
: Base(pstate, "Top-level selectors may not contain the parent selector \"&\".", traces)
|
137
|
+
{
|
138
|
+
|
139
|
+
}
|
140
|
+
|
141
|
+
UnsatisfiedExtend::UnsatisfiedExtend(Backtraces traces, Extension extension)
|
142
|
+
: Base(extension.target->pstate(), "The target selector was not found.\n"
|
143
|
+
"Use \"@extend " + extension.target->to_string() + " !optional\" to avoid this error.", traces)
|
144
|
+
{
|
145
|
+
|
146
|
+
}
|
147
|
+
|
148
|
+
ExtendAcrossMedia::ExtendAcrossMedia(Backtraces traces, Extension extension)
|
149
|
+
: Base(extension.target->pstate(), "You may not @extend selectors across media queries.\n"
|
150
|
+
"Use \"@extend " + extension.target->to_string() + " !optional\" to avoid this error.", traces)
|
151
|
+
{
|
152
|
+
|
153
|
+
}
|
154
|
+
|
155
|
+
|
135
156
|
}
|
136
157
|
|
137
158
|
|
138
|
-
void warn(
|
159
|
+
void warn(sass::string msg, SourceSpan pstate)
|
139
160
|
{
|
140
161
|
std::cerr << "Warning: " << msg << std::endl;
|
141
162
|
}
|
142
163
|
|
143
|
-
void warning(
|
164
|
+
void warning(sass::string msg, SourceSpan pstate)
|
144
165
|
{
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
166
|
+
sass::string cwd(Sass::File::get_cwd());
|
167
|
+
sass::string abs_path(Sass::File::rel2abs(pstate.getPath(), cwd, cwd));
|
168
|
+
sass::string rel_path(Sass::File::abs2rel(pstate.getPath(), cwd, cwd));
|
169
|
+
sass::string output_path(Sass::File::path_for_console(rel_path, abs_path, pstate.getPath()));
|
149
170
|
|
150
|
-
std::cerr << "WARNING on line " << pstate.
|
171
|
+
std::cerr << "WARNING on line " << pstate.getLine() << ", column " << pstate.getColumn() << " of " << output_path << ":" << std::endl;
|
151
172
|
std::cerr << msg << std::endl << std::endl;
|
152
173
|
}
|
153
174
|
|
154
|
-
void warn(
|
175
|
+
void warn(sass::string msg, SourceSpan pstate, Backtrace* bt)
|
155
176
|
{
|
156
177
|
warn(msg, pstate);
|
157
178
|
}
|
158
179
|
|
159
|
-
void deprecated_function(
|
180
|
+
void deprecated_function(sass::string msg, SourceSpan pstate)
|
160
181
|
{
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
182
|
+
sass::string cwd(Sass::File::get_cwd());
|
183
|
+
sass::string abs_path(Sass::File::rel2abs(pstate.getPath(), cwd, cwd));
|
184
|
+
sass::string rel_path(Sass::File::abs2rel(pstate.getPath(), cwd, cwd));
|
185
|
+
sass::string output_path(Sass::File::path_for_console(rel_path, abs_path, pstate.getPath()));
|
165
186
|
|
166
187
|
std::cerr << "DEPRECATION WARNING: " << msg << std::endl;
|
167
188
|
std::cerr << "will be an error in future versions of Sass." << std::endl;
|
168
|
-
std::cerr << " on line " << pstate.
|
189
|
+
std::cerr << " on line " << pstate.getLine() << " of " << output_path << std::endl;
|
169
190
|
}
|
170
191
|
|
171
|
-
void deprecated(
|
192
|
+
void deprecated(sass::string msg, sass::string msg2, bool with_column, SourceSpan pstate)
|
172
193
|
{
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
194
|
+
sass::string cwd(Sass::File::get_cwd());
|
195
|
+
sass::string abs_path(Sass::File::rel2abs(pstate.getPath(), cwd, cwd));
|
196
|
+
sass::string rel_path(Sass::File::abs2rel(pstate.getPath(), cwd, cwd));
|
197
|
+
sass::string output_path(Sass::File::path_for_console(rel_path, pstate.getPath(), pstate.getPath()));
|
177
198
|
|
178
|
-
std::cerr << "DEPRECATION WARNING on line " << pstate.
|
179
|
-
if (with_column) std::cerr << ", column " << pstate.column + pstate.offset.column + 1;
|
199
|
+
std::cerr << "DEPRECATION WARNING on line " << pstate.getLine();
|
200
|
+
// if (with_column) std::cerr << ", column " << pstate.column + pstate.offset.column + 1;
|
180
201
|
if (output_path.length()) std::cerr << " of " << output_path;
|
181
202
|
std::cerr << ":" << std::endl;
|
182
203
|
std::cerr << msg << std::endl;
|
@@ -184,26 +205,26 @@ namespace Sass {
|
|
184
205
|
std::cerr << std::endl;
|
185
206
|
}
|
186
207
|
|
187
|
-
void deprecated_bind(
|
208
|
+
void deprecated_bind(sass::string msg, SourceSpan pstate)
|
188
209
|
{
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
210
|
+
sass::string cwd(Sass::File::get_cwd());
|
211
|
+
sass::string abs_path(Sass::File::rel2abs(pstate.getPath(), cwd, cwd));
|
212
|
+
sass::string rel_path(Sass::File::abs2rel(pstate.getPath(), cwd, cwd));
|
213
|
+
sass::string output_path(Sass::File::path_for_console(rel_path, abs_path, pstate.getPath()));
|
193
214
|
|
194
215
|
std::cerr << "WARNING: " << msg << std::endl;
|
195
|
-
std::cerr << " on line " << pstate.
|
216
|
+
std::cerr << " on line " << pstate.getLine() << " of " << output_path << std::endl;
|
196
217
|
std::cerr << "This will be an error in future versions of Sass." << std::endl;
|
197
218
|
}
|
198
219
|
|
199
220
|
// should be replaced with error with backtraces
|
200
|
-
void coreError(
|
221
|
+
void coreError(sass::string msg, SourceSpan pstate)
|
201
222
|
{
|
202
223
|
Backtraces traces;
|
203
224
|
throw Exception::InvalidSyntax(pstate, traces, msg);
|
204
225
|
}
|
205
226
|
|
206
|
-
void error(
|
227
|
+
void error(sass::string msg, SourceSpan pstate, Backtraces& traces)
|
207
228
|
{
|
208
229
|
traces.push_back(Backtrace(pstate));
|
209
230
|
throw Exception::InvalidSyntax(pstate, traces, msg);
|
@@ -1,6 +1,10 @@
|
|
1
1
|
#ifndef SASS_ERROR_HANDLING_H
|
2
2
|
#define SASS_ERROR_HANDLING_H
|
3
3
|
|
4
|
+
// sass.hpp must go before all system headers to get the
|
5
|
+
// __EXTENSIONS__ fix on Solaris.
|
6
|
+
#include "sass.hpp"
|
7
|
+
|
4
8
|
#include <string>
|
5
9
|
#include <sstream>
|
6
10
|
#include <stdexcept>
|
@@ -16,20 +20,20 @@ namespace Sass {
|
|
16
20
|
|
17
21
|
namespace Exception {
|
18
22
|
|
19
|
-
const
|
20
|
-
const
|
21
|
-
const
|
22
|
-
const
|
23
|
+
const sass::string def_msg = "Invalid sass detected";
|
24
|
+
const sass::string def_op_msg = "Undefined operation";
|
25
|
+
const sass::string def_op_null_msg = "Invalid null operation";
|
26
|
+
const sass::string def_nesting_limit = "Code too deeply nested";
|
23
27
|
|
24
28
|
class Base : public std::runtime_error {
|
25
29
|
protected:
|
26
|
-
|
27
|
-
|
30
|
+
sass::string msg;
|
31
|
+
sass::string prefix;
|
28
32
|
public:
|
29
|
-
|
33
|
+
SourceSpan pstate;
|
30
34
|
Backtraces traces;
|
31
35
|
public:
|
32
|
-
Base(
|
36
|
+
Base(SourceSpan pstate, sass::string msg, Backtraces traces);
|
33
37
|
virtual const char* errtype() const { return prefix.c_str(); }
|
34
38
|
virtual const char* what() const throw() { return msg.c_str(); }
|
35
39
|
virtual ~Base() throw() {};
|
@@ -37,20 +41,8 @@ namespace Sass {
|
|
37
41
|
|
38
42
|
class InvalidSass : public Base {
|
39
43
|
public:
|
40
|
-
InvalidSass(
|
41
|
-
|
42
|
-
other.owned_src = nullptr;
|
43
|
-
}
|
44
|
-
|
45
|
-
// Required because the copy constructor's argument is not const.
|
46
|
-
// Can't use `std::move` here because we build on Visual Studio 2013.
|
47
|
-
InvalidSass(InvalidSass &&other) : Base(other), owned_src(other.owned_src) {
|
48
|
-
other.owned_src = nullptr;
|
49
|
-
}
|
50
|
-
|
51
|
-
InvalidSass(ParserState pstate, Backtraces traces, std::string msg, char* owned_src = nullptr);
|
52
|
-
virtual ~InvalidSass() throw() { sass_free_memory(owned_src); };
|
53
|
-
char *owned_src;
|
44
|
+
InvalidSass(SourceSpan pstate, Backtraces traces, sass::string msg);
|
45
|
+
virtual ~InvalidSass() throw() {};
|
54
46
|
};
|
55
47
|
|
56
48
|
class InvalidParent : public Base {
|
@@ -64,43 +56,43 @@ namespace Sass {
|
|
64
56
|
|
65
57
|
class MissingArgument : public Base {
|
66
58
|
protected:
|
67
|
-
|
68
|
-
|
69
|
-
|
59
|
+
sass::string fn;
|
60
|
+
sass::string arg;
|
61
|
+
sass::string fntype;
|
70
62
|
public:
|
71
|
-
MissingArgument(
|
63
|
+
MissingArgument(SourceSpan pstate, Backtraces traces, sass::string fn, sass::string arg, sass::string fntype);
|
72
64
|
virtual ~MissingArgument() throw() {};
|
73
65
|
};
|
74
66
|
|
75
67
|
class InvalidArgumentType : public Base {
|
76
68
|
protected:
|
77
|
-
|
78
|
-
|
79
|
-
|
69
|
+
sass::string fn;
|
70
|
+
sass::string arg;
|
71
|
+
sass::string type;
|
80
72
|
const Value* value;
|
81
73
|
public:
|
82
|
-
InvalidArgumentType(
|
74
|
+
InvalidArgumentType(SourceSpan pstate, Backtraces traces, sass::string fn, sass::string arg, sass::string type, const Value* value = 0);
|
83
75
|
virtual ~InvalidArgumentType() throw() {};
|
84
76
|
};
|
85
77
|
|
86
78
|
class InvalidVarKwdType : public Base {
|
87
79
|
protected:
|
88
|
-
|
80
|
+
sass::string name;
|
89
81
|
const Argument* arg;
|
90
82
|
public:
|
91
|
-
InvalidVarKwdType(
|
83
|
+
InvalidVarKwdType(SourceSpan pstate, Backtraces traces, sass::string name, const Argument* arg = 0);
|
92
84
|
virtual ~InvalidVarKwdType() throw() {};
|
93
85
|
};
|
94
86
|
|
95
87
|
class InvalidSyntax : public Base {
|
96
88
|
public:
|
97
|
-
InvalidSyntax(
|
89
|
+
InvalidSyntax(SourceSpan pstate, Backtraces traces, sass::string msg);
|
98
90
|
virtual ~InvalidSyntax() throw() {};
|
99
91
|
};
|
100
92
|
|
101
93
|
class NestingLimitError : public Base {
|
102
94
|
public:
|
103
|
-
NestingLimitError(
|
95
|
+
NestingLimitError(SourceSpan pstate, Backtraces traces, sass::string msg = def_nesting_limit);
|
104
96
|
virtual ~NestingLimitError() throw() {};
|
105
97
|
};
|
106
98
|
|
@@ -117,9 +109,9 @@ namespace Sass {
|
|
117
109
|
class TypeMismatch : public Base {
|
118
110
|
protected:
|
119
111
|
const Expression& var;
|
120
|
-
const
|
112
|
+
const sass::string type;
|
121
113
|
public:
|
122
|
-
TypeMismatch(Backtraces traces, const Expression& var, const
|
114
|
+
TypeMismatch(Backtraces traces, const Expression& var, const sass::string type);
|
123
115
|
virtual const char* errtype() const { return "Error"; }
|
124
116
|
virtual ~TypeMismatch() throw() {};
|
125
117
|
};
|
@@ -145,10 +137,10 @@ namespace Sass {
|
|
145
137
|
/* common virtual base class (has no pstate or trace) */
|
146
138
|
class OperationError : public std::runtime_error {
|
147
139
|
protected:
|
148
|
-
|
140
|
+
sass::string msg;
|
149
141
|
public:
|
150
|
-
OperationError(
|
151
|
-
: std::runtime_error(msg), msg(msg)
|
142
|
+
OperationError(sass::string msg = def_op_msg)
|
143
|
+
: std::runtime_error(msg.c_str()), msg(msg)
|
152
144
|
{};
|
153
145
|
public:
|
154
146
|
virtual const char* errtype() const { return "Error"; }
|
@@ -205,24 +197,42 @@ namespace Sass {
|
|
205
197
|
};
|
206
198
|
|
207
199
|
class SassValueError : public Base {
|
208
|
-
|
209
|
-
|
210
|
-
|
200
|
+
public:
|
201
|
+
SassValueError(Backtraces traces, SourceSpan pstate, OperationError& err);
|
202
|
+
virtual ~SassValueError() throw() {};
|
203
|
+
};
|
204
|
+
|
205
|
+
class TopLevelParent : public Base {
|
206
|
+
public:
|
207
|
+
TopLevelParent(Backtraces traces, SourceSpan pstate);
|
208
|
+
virtual ~TopLevelParent() throw() {};
|
209
|
+
};
|
210
|
+
|
211
|
+
class UnsatisfiedExtend : public Base {
|
212
|
+
public:
|
213
|
+
UnsatisfiedExtend(Backtraces traces, Extension extension);
|
214
|
+
virtual ~UnsatisfiedExtend() throw() {};
|
215
|
+
};
|
216
|
+
|
217
|
+
class ExtendAcrossMedia : public Base {
|
218
|
+
public:
|
219
|
+
ExtendAcrossMedia(Backtraces traces, Extension extension);
|
220
|
+
virtual ~ExtendAcrossMedia() throw() {};
|
211
221
|
};
|
212
222
|
|
213
223
|
}
|
214
224
|
|
215
|
-
void warn(
|
216
|
-
void warn(
|
217
|
-
void warning(
|
225
|
+
void warn(sass::string msg, SourceSpan pstate);
|
226
|
+
void warn(sass::string msg, SourceSpan pstate, Backtrace* bt);
|
227
|
+
void warning(sass::string msg, SourceSpan pstate);
|
218
228
|
|
219
|
-
void deprecated_function(
|
220
|
-
void deprecated(
|
221
|
-
void deprecated_bind(
|
222
|
-
// void deprecated(
|
229
|
+
void deprecated_function(sass::string msg, SourceSpan pstate);
|
230
|
+
void deprecated(sass::string msg, sass::string msg2, bool with_column, SourceSpan pstate);
|
231
|
+
void deprecated_bind(sass::string msg, SourceSpan pstate);
|
232
|
+
// void deprecated(sass::string msg, SourceSpan pstate, Backtrace* bt);
|
223
233
|
|
224
|
-
void coreError(
|
225
|
-
void error(
|
234
|
+
void coreError(sass::string msg, SourceSpan pstate);
|
235
|
+
void error(sass::string msg, SourceSpan pstate, Backtraces& traces);
|
226
236
|
|
227
237
|
}
|
228
238
|
|