sassc 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/ext/libsass/.gitignore +13 -6
- data/ext/libsass/Makefile +42 -26
- data/ext/libsass/Makefile.am +43 -30
- data/ext/libsass/Readme.md +4 -2
- data/ext/libsass/appveyor.yml +10 -14
- data/ext/libsass/ast.cpp +54 -44
- data/ext/libsass/ast.hpp +404 -236
- data/ext/libsass/ast_def_macros.hpp +5 -0
- data/ext/libsass/ast_factory.hpp +6 -3
- data/ext/libsass/ast_fwd_decl.hpp +12 -0
- data/ext/libsass/b64/encode.h +2 -2
- data/ext/libsass/backtrace.hpp +13 -17
- data/ext/libsass/base64vlq.hpp +4 -1
- data/ext/libsass/bind.cpp +12 -15
- data/ext/libsass/bind.hpp +6 -6
- data/ext/libsass/color_names.hpp +4 -1
- data/ext/libsass/configure.ac +7 -21
- data/ext/libsass/constants.cpp +6 -4
- data/ext/libsass/constants.hpp +10 -4
- data/ext/libsass/context.cpp +89 -58
- data/ext/libsass/context.hpp +28 -35
- data/ext/libsass/contextualize.cpp +20 -10
- data/ext/libsass/contextualize.hpp +8 -23
- data/ext/libsass/contrib/libsass.spec +66 -0
- data/ext/libsass/cssize.cpp +547 -0
- data/ext/libsass/cssize.hpp +82 -0
- data/ext/libsass/debug.hpp +3 -3
- data/ext/libsass/debugger.hpp +358 -0
- data/ext/libsass/emitter.cpp +255 -0
- data/ext/libsass/emitter.hpp +83 -0
- data/ext/libsass/environment.hpp +7 -3
- data/ext/libsass/error_handling.cpp +11 -14
- data/ext/libsass/error_handling.hpp +9 -7
- data/ext/libsass/eval.cpp +253 -161
- data/ext/libsass/eval.hpp +13 -13
- data/ext/libsass/expand.cpp +135 -64
- data/ext/libsass/expand.hpp +11 -13
- data/ext/libsass/extend.cpp +66 -20
- data/ext/libsass/extend.hpp +6 -11
- data/ext/libsass/file.cpp +31 -26
- data/ext/libsass/file.hpp +6 -1
- data/ext/libsass/functions.cpp +270 -287
- data/ext/libsass/functions.hpp +8 -11
- data/ext/libsass/inspect.cpp +385 -255
- data/ext/libsass/inspect.hpp +15 -26
- data/ext/libsass/kwd_arg_macros.hpp +5 -0
- data/ext/libsass/mapping.hpp +4 -3
- data/ext/libsass/memory_manager.hpp +5 -2
- data/ext/libsass/node.cpp +50 -50
- data/ext/libsass/node.hpp +26 -27
- data/ext/libsass/operation.hpp +15 -4
- data/ext/libsass/output.cpp +401 -0
- data/ext/libsass/output.hpp +56 -0
- data/ext/libsass/parser.cpp +573 -399
- data/ext/libsass/parser.hpp +122 -88
- data/ext/libsass/paths.hpp +7 -2
- data/ext/libsass/plugins.cpp +155 -0
- data/ext/libsass/plugins.hpp +56 -0
- data/ext/libsass/position.cpp +128 -0
- data/ext/libsass/position.hpp +108 -11
- data/ext/libsass/prelexer.cpp +184 -110
- data/ext/libsass/prelexer.hpp +131 -24
- data/ext/libsass/remove_placeholders.cpp +1 -1
- data/ext/libsass/remove_placeholders.hpp +6 -6
- data/ext/libsass/sass.cpp +3 -3
- data/ext/libsass/sass.h +12 -4
- data/ext/libsass/sass2scss.cpp +3 -2
- data/ext/libsass/sass2scss.h +5 -0
- data/ext/libsass/sass_context.cpp +136 -37
- data/ext/libsass/sass_context.h +19 -10
- data/ext/libsass/sass_functions.cpp +29 -2
- data/ext/libsass/sass_functions.h +8 -2
- data/ext/libsass/sass_interface.cpp +32 -23
- data/ext/libsass/sass_interface.h +9 -4
- data/ext/libsass/sass_util.cpp +19 -23
- data/ext/libsass/sass_util.hpp +28 -27
- data/ext/libsass/sass_values.cpp +6 -4
- data/ext/libsass/sass_values.h +3 -3
- data/ext/libsass/script/ci-build-libsass +13 -1
- data/ext/libsass/script/ci-report-coverage +2 -1
- data/ext/libsass/source_map.cpp +79 -28
- data/ext/libsass/source_map.hpp +35 -16
- data/ext/libsass/subset_map.hpp +6 -4
- data/ext/libsass/to_c.hpp +4 -4
- data/ext/libsass/to_string.cpp +13 -8
- data/ext/libsass/to_string.hpp +6 -4
- data/ext/libsass/units.cpp +2 -1
- data/ext/libsass/units.hpp +6 -1
- data/ext/libsass/utf8_string.cpp +0 -5
- data/ext/libsass/utf8_string.hpp +3 -2
- data/ext/libsass/util.cpp +461 -49
- data/ext/libsass/util.hpp +34 -13
- data/ext/libsass/version.sh +10 -0
- data/ext/libsass/win/libsass.filters +20 -11
- data/ext/libsass/win/libsass.vcxproj +11 -8
- data/lib/sassc/importer.rb +1 -8
- data/lib/sassc/native.rb +7 -0
- data/lib/sassc/native/native_context_api.rb +5 -5
- data/lib/sassc/version.rb +1 -1
- data/test/native_test.rb +1 -1
- metadata +14 -10
- data/ext/libsass/copy_c_str.cpp +0 -13
- data/ext/libsass/copy_c_str.hpp +0 -5
- data/ext/libsass/output_compressed.cpp +0 -401
- data/ext/libsass/output_compressed.hpp +0 -95
- data/ext/libsass/output_nested.cpp +0 -364
- data/ext/libsass/output_nested.hpp +0 -108
- data/ext/libsass/test-driver +0 -127
- data/ext/libsass/token.hpp +0 -32
@@ -1,108 +0,0 @@
|
|
1
|
-
#include <string>
|
2
|
-
|
3
|
-
#ifndef SASS_OPERATION
|
4
|
-
#include "operation.hpp"
|
5
|
-
#endif
|
6
|
-
|
7
|
-
// #ifndef SASS_TO_STRING
|
8
|
-
// #include "to_string.hpp"
|
9
|
-
// #endif
|
10
|
-
|
11
|
-
namespace Sass {
|
12
|
-
using namespace std;
|
13
|
-
struct Context;
|
14
|
-
|
15
|
-
class Output_Nested : public Operation_CRTP<void, Output_Nested> {
|
16
|
-
// import all the class-specific methods and override as desired
|
17
|
-
using Operation_CRTP<void, Output_Nested>::operator();
|
18
|
-
|
19
|
-
string buffer;
|
20
|
-
string rendered_imports;
|
21
|
-
size_t indentation;
|
22
|
-
bool source_comments;
|
23
|
-
Context* ctx;
|
24
|
-
bool seen_utf8;
|
25
|
-
void indent();
|
26
|
-
|
27
|
-
void fallback_impl(AST_Node* n);
|
28
|
-
|
29
|
-
void append_to_buffer(const string& text);
|
30
|
-
|
31
|
-
public:
|
32
|
-
|
33
|
-
Output_Nested(bool source_comments = false, Context* ctx = 0);
|
34
|
-
virtual ~Output_Nested();
|
35
|
-
|
36
|
-
string get_buffer() {
|
37
|
-
if (!rendered_imports.empty() && !buffer.empty()) {
|
38
|
-
rendered_imports += "\n";
|
39
|
-
}
|
40
|
-
return (seen_utf8 ? "@charset \"UTF-8\";\n" : "")
|
41
|
-
+ rendered_imports + buffer;
|
42
|
-
}
|
43
|
-
|
44
|
-
// statements
|
45
|
-
virtual void operator()(Block*);
|
46
|
-
virtual void operator()(Ruleset*);
|
47
|
-
// virtual void operator()(Propset*);
|
48
|
-
virtual void operator()(Feature_Block*);
|
49
|
-
virtual void operator()(Media_Block*);
|
50
|
-
virtual void operator()(At_Rule*);
|
51
|
-
// virtual void operator()(Declaration*);
|
52
|
-
// virtual void operator()(Assignment*);
|
53
|
-
virtual void operator()(Import*);
|
54
|
-
// virtual void operator()(Import_Stub*);
|
55
|
-
// virtual void operator()(Warning*);
|
56
|
-
// virtual void operator()(Error*);
|
57
|
-
// virtual void operator()(Debug*);
|
58
|
-
// virtual void operator()(Comment*);
|
59
|
-
// virtual void operator()(If*);
|
60
|
-
// virtual void operator()(For*);
|
61
|
-
// virtual void operator()(Each*);
|
62
|
-
// virtual void operator()(While*);
|
63
|
-
// virtual void operator()(Return*);
|
64
|
-
// virtual void operator()(Extension*);
|
65
|
-
// virtual void operator()(Definition*);
|
66
|
-
// virtual void operator()(Mixin_Call*);
|
67
|
-
// virtual void operator()(Content*);
|
68
|
-
// // expressions
|
69
|
-
// virtual void operator()(List*);
|
70
|
-
// virtual void operator()(Binary_Expression*);
|
71
|
-
// virtual void operator()(Unary_Expression*);
|
72
|
-
// virtual void operator()(Function_Call*);
|
73
|
-
// virtual void operator()(Function_Call_Schema*);
|
74
|
-
// virtual void operator()(Variable*);
|
75
|
-
// virtual void operator()(Textual*);
|
76
|
-
// virtual void operator()(Number*);
|
77
|
-
// virtual void operator()(Color*);
|
78
|
-
// virtual void operator()(Boolean*);
|
79
|
-
// virtual void operator()(String_Schema*);
|
80
|
-
// virtual void operator()(String_Constant* x);
|
81
|
-
// virtual void operator()(Media_Query*);
|
82
|
-
// virtual void operator()(Media_Query_Expression*);
|
83
|
-
// // parameters and arguments
|
84
|
-
// virtual void operator()(Parameter*);
|
85
|
-
// virtual void operator()(Parameters*);
|
86
|
-
// virtual void operator()(Argument*);
|
87
|
-
// virtual void operator()(Arguments*);
|
88
|
-
// // selectors
|
89
|
-
// virtual void operator()(Selector_Schema*);
|
90
|
-
// virtual void operator()(Selector_Reference*);
|
91
|
-
// virtual void operator()(Selector_Placeholder*);
|
92
|
-
// virtual void operator()(Type_Selector*);
|
93
|
-
// virtual void operator()(Selector_Qualifier*);
|
94
|
-
// virtual void operator()(Attribute_Selector*);
|
95
|
-
// virtual void operator()(Pseudo_Selector*);
|
96
|
-
// virtual void operator()(Wrapped_Selector*);
|
97
|
-
// virtual void operator()(Compound_Selector*);
|
98
|
-
// virtual void operator()(Complex_Selector*);
|
99
|
-
// virtual void operator()(Selector_List*);
|
100
|
-
|
101
|
-
template <typename U>
|
102
|
-
void fallback(U x) { fallback_impl(x); }
|
103
|
-
};
|
104
|
-
|
105
|
-
string unquote(const string&);
|
106
|
-
string quote(const string&, char);
|
107
|
-
|
108
|
-
}
|
data/ext/libsass/test-driver
DELETED
@@ -1,127 +0,0 @@
|
|
1
|
-
#! /bin/sh
|
2
|
-
# test-driver - basic testsuite driver script.
|
3
|
-
|
4
|
-
scriptversion=2012-06-27.10; # UTC
|
5
|
-
|
6
|
-
# Copyright (C) 2011-2013 Free Software Foundation, Inc.
|
7
|
-
#
|
8
|
-
# This program is free software; you can redistribute it and/or modify
|
9
|
-
# it under the terms of the GNU General Public License as published by
|
10
|
-
# the Free Software Foundation; either version 2, or (at your option)
|
11
|
-
# any later version.
|
12
|
-
#
|
13
|
-
# This program is distributed in the hope that it will be useful,
|
14
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16
|
-
# GNU General Public License for more details.
|
17
|
-
#
|
18
|
-
# You should have received a copy of the GNU General Public License
|
19
|
-
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
20
|
-
|
21
|
-
# As a special exception to the GNU General Public License, if you
|
22
|
-
# distribute this file as part of a program that contains a
|
23
|
-
# configuration script generated by Autoconf, you may include it under
|
24
|
-
# the same distribution terms that you use for the rest of that program.
|
25
|
-
|
26
|
-
# This file is maintained in Automake, please report
|
27
|
-
# bugs to <bug-automake@gnu.org> or send patches to
|
28
|
-
# <automake-patches@gnu.org>.
|
29
|
-
|
30
|
-
# Make unconditional expansion of undefined variables an error. This
|
31
|
-
# helps a lot in preventing typo-related bugs.
|
32
|
-
set -u
|
33
|
-
|
34
|
-
usage_error ()
|
35
|
-
{
|
36
|
-
echo "$0: $*" >&2
|
37
|
-
print_usage >&2
|
38
|
-
exit 2
|
39
|
-
}
|
40
|
-
|
41
|
-
print_usage ()
|
42
|
-
{
|
43
|
-
cat <<END
|
44
|
-
Usage:
|
45
|
-
test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
|
46
|
-
[--expect-failure={yes|no}] [--color-tests={yes|no}]
|
47
|
-
[--enable-hard-errors={yes|no}] [--] TEST-SCRIPT
|
48
|
-
The '--test-name', '--log-file' and '--trs-file' options are mandatory.
|
49
|
-
END
|
50
|
-
}
|
51
|
-
|
52
|
-
# TODO: better error handling in option parsing (in particular, ensure
|
53
|
-
# TODO: $log_file, $trs_file and $test_name are defined).
|
54
|
-
test_name= # Used for reporting.
|
55
|
-
log_file= # Where to save the output of the test script.
|
56
|
-
trs_file= # Where to save the metadata of the test run.
|
57
|
-
expect_failure=no
|
58
|
-
color_tests=no
|
59
|
-
enable_hard_errors=yes
|
60
|
-
while test $# -gt 0; do
|
61
|
-
case $1 in
|
62
|
-
--help) print_usage; exit $?;;
|
63
|
-
--version) echo "test-driver $scriptversion"; exit $?;;
|
64
|
-
--test-name) test_name=$2; shift;;
|
65
|
-
--log-file) log_file=$2; shift;;
|
66
|
-
--trs-file) trs_file=$2; shift;;
|
67
|
-
--color-tests) color_tests=$2; shift;;
|
68
|
-
--expect-failure) expect_failure=$2; shift;;
|
69
|
-
--enable-hard-errors) enable_hard_errors=$2; shift;;
|
70
|
-
--) shift; break;;
|
71
|
-
-*) usage_error "invalid option: '$1'";;
|
72
|
-
esac
|
73
|
-
shift
|
74
|
-
done
|
75
|
-
|
76
|
-
if test $color_tests = yes; then
|
77
|
-
# Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
|
78
|
-
red='[0;31m' # Red.
|
79
|
-
grn='[0;32m' # Green.
|
80
|
-
lgn='[1;32m' # Light green.
|
81
|
-
blu='[1;34m' # Blue.
|
82
|
-
mgn='[0;35m' # Magenta.
|
83
|
-
std='[m' # No color.
|
84
|
-
else
|
85
|
-
red= grn= lgn= blu= mgn= std=
|
86
|
-
fi
|
87
|
-
|
88
|
-
do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
|
89
|
-
trap "st=129; $do_exit" 1
|
90
|
-
trap "st=130; $do_exit" 2
|
91
|
-
trap "st=141; $do_exit" 13
|
92
|
-
trap "st=143; $do_exit" 15
|
93
|
-
|
94
|
-
# Test script is run here.
|
95
|
-
"$@" >$log_file 2>&1
|
96
|
-
estatus=$?
|
97
|
-
if test $enable_hard_errors = no && test $estatus -eq 99; then
|
98
|
-
estatus=1
|
99
|
-
fi
|
100
|
-
|
101
|
-
case $estatus:$expect_failure in
|
102
|
-
0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
|
103
|
-
0:*) col=$grn res=PASS recheck=no gcopy=no;;
|
104
|
-
77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
|
105
|
-
99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
|
106
|
-
*:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
|
107
|
-
*:*) col=$red res=FAIL recheck=yes gcopy=yes;;
|
108
|
-
esac
|
109
|
-
|
110
|
-
# Report outcome to console.
|
111
|
-
echo "${col}${res}${std}: $test_name"
|
112
|
-
|
113
|
-
# Register the test result, and other relevant metadata.
|
114
|
-
echo ":test-result: $res" > $trs_file
|
115
|
-
echo ":global-test-result: $res" >> $trs_file
|
116
|
-
echo ":recheck: $recheck" >> $trs_file
|
117
|
-
echo ":copy-in-global-log: $gcopy" >> $trs_file
|
118
|
-
|
119
|
-
# Local Variables:
|
120
|
-
# mode: shell-script
|
121
|
-
# sh-indentation: 2
|
122
|
-
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
123
|
-
# time-stamp-start: "scriptversion="
|
124
|
-
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
125
|
-
# time-stamp-time-zone: "UTC"
|
126
|
-
# time-stamp-end: "; # UTC"
|
127
|
-
# End:
|
data/ext/libsass/token.hpp
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
#define SASS_TOKEN
|
2
|
-
|
3
|
-
#include <cstring>
|
4
|
-
#include <string>
|
5
|
-
#include <sstream>
|
6
|
-
|
7
|
-
namespace Sass {
|
8
|
-
using namespace std;
|
9
|
-
|
10
|
-
// Token type for representing lexed chunks of text
|
11
|
-
struct Token {
|
12
|
-
|
13
|
-
const char* begin;
|
14
|
-
const char* end;
|
15
|
-
|
16
|
-
Token() : begin(0), end(0) { }
|
17
|
-
Token(const char* s) : begin(s), end(s + strlen(s)) { }
|
18
|
-
Token(const char* b, const char* e) : begin(b), end(e) { }
|
19
|
-
|
20
|
-
size_t length() const { return end - begin; }
|
21
|
-
string to_string() const { return string(begin, end - begin); }
|
22
|
-
|
23
|
-
string unquote() const;
|
24
|
-
void unquote_to_stream(stringstream& buf) const;
|
25
|
-
|
26
|
-
operator bool() { return begin && end && begin >= end; }
|
27
|
-
operator string() { return to_string(); }
|
28
|
-
|
29
|
-
bool operator==(Token t) { return to_string() == t.to_string(); }
|
30
|
-
};
|
31
|
-
|
32
|
-
}
|