sassc 0.0.1
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 +7 -0
- data/.gitignore +15 -0
- data/.gitmodules +3 -0
- data/.travis.yml +9 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +24 -0
- data/Rakefile +21 -0
- data/ext/libsass/.editorconfig +15 -0
- data/ext/libsass/.gitattributes +2 -0
- data/ext/libsass/.gitignore +61 -0
- data/ext/libsass/.travis.yml +38 -0
- data/ext/libsass/COPYING +25 -0
- data/ext/libsass/INSTALL +1 -0
- data/ext/libsass/LICENSE +25 -0
- data/ext/libsass/Makefile +223 -0
- data/ext/libsass/Makefile.am +145 -0
- data/ext/libsass/Readme.md +93 -0
- data/ext/libsass/appveyor.yml +76 -0
- data/ext/libsass/ast.cpp +581 -0
- data/ext/libsass/ast.hpp +1949 -0
- data/ext/libsass/ast_def_macros.hpp +16 -0
- data/ext/libsass/ast_factory.hpp +87 -0
- data/ext/libsass/ast_fwd_decl.hpp +72 -0
- data/ext/libsass/b64/cencode.h +32 -0
- data/ext/libsass/b64/encode.h +77 -0
- data/ext/libsass/backtrace.hpp +81 -0
- data/ext/libsass/base64vlq.cpp +43 -0
- data/ext/libsass/base64vlq.hpp +28 -0
- data/ext/libsass/bind.cpp +187 -0
- data/ext/libsass/bind.hpp +18 -0
- data/ext/libsass/cencode.c +102 -0
- data/ext/libsass/color_names.hpp +324 -0
- data/ext/libsass/configure.ac +130 -0
- data/ext/libsass/constants.cpp +144 -0
- data/ext/libsass/constants.hpp +145 -0
- data/ext/libsass/context.cpp +507 -0
- data/ext/libsass/context.hpp +150 -0
- data/ext/libsass/contextualize.cpp +157 -0
- data/ext/libsass/contextualize.hpp +65 -0
- data/ext/libsass/copy_c_str.cpp +13 -0
- data/ext/libsass/copy_c_str.hpp +5 -0
- data/ext/libsass/debug.hpp +39 -0
- data/ext/libsass/environment.hpp +75 -0
- data/ext/libsass/error_handling.cpp +28 -0
- data/ext/libsass/error_handling.hpp +28 -0
- data/ext/libsass/eval.cpp +1149 -0
- data/ext/libsass/eval.hpp +80 -0
- data/ext/libsass/expand.cpp +430 -0
- data/ext/libsass/expand.hpp +77 -0
- data/ext/libsass/extconf.rb +6 -0
- data/ext/libsass/extend.cpp +1962 -0
- data/ext/libsass/extend.hpp +50 -0
- data/ext/libsass/file.cpp +291 -0
- data/ext/libsass/file.hpp +18 -0
- data/ext/libsass/functions.cpp +1565 -0
- data/ext/libsass/functions.hpp +187 -0
- data/ext/libsass/inspect.cpp +727 -0
- data/ext/libsass/inspect.hpp +108 -0
- data/ext/libsass/json.cpp +1411 -0
- data/ext/libsass/json.hpp +117 -0
- data/ext/libsass/kwd_arg_macros.hpp +23 -0
- data/ext/libsass/m4/.gitkeep +0 -0
- data/ext/libsass/mapping.hpp +17 -0
- data/ext/libsass/memory_manager.hpp +54 -0
- data/ext/libsass/node.cpp +251 -0
- data/ext/libsass/node.hpp +122 -0
- data/ext/libsass/operation.hpp +153 -0
- data/ext/libsass/output_compressed.cpp +401 -0
- data/ext/libsass/output_compressed.hpp +95 -0
- data/ext/libsass/output_nested.cpp +364 -0
- data/ext/libsass/output_nested.hpp +108 -0
- data/ext/libsass/parser.cpp +2016 -0
- data/ext/libsass/parser.hpp +264 -0
- data/ext/libsass/paths.hpp +69 -0
- data/ext/libsass/position.hpp +22 -0
- data/ext/libsass/posix/getopt.c +562 -0
- data/ext/libsass/posix/getopt.h +95 -0
- data/ext/libsass/prelexer.cpp +688 -0
- data/ext/libsass/prelexer.hpp +513 -0
- data/ext/libsass/remove_placeholders.cpp +59 -0
- data/ext/libsass/remove_placeholders.hpp +43 -0
- data/ext/libsass/res/resource.rc +35 -0
- data/ext/libsass/sass.cpp +33 -0
- data/ext/libsass/sass.h +60 -0
- data/ext/libsass/sass2scss.cpp +834 -0
- data/ext/libsass/sass2scss.h +110 -0
- data/ext/libsass/sass_context.cpp +709 -0
- data/ext/libsass/sass_context.h +120 -0
- data/ext/libsass/sass_functions.cpp +137 -0
- data/ext/libsass/sass_functions.h +90 -0
- data/ext/libsass/sass_interface.cpp +277 -0
- data/ext/libsass/sass_interface.h +97 -0
- data/ext/libsass/sass_util.cpp +136 -0
- data/ext/libsass/sass_util.hpp +259 -0
- data/ext/libsass/sass_values.cpp +337 -0
- data/ext/libsass/sass_values.h +124 -0
- data/ext/libsass/script/bootstrap +10 -0
- data/ext/libsass/script/branding +10 -0
- data/ext/libsass/script/ci-build-libsass +72 -0
- data/ext/libsass/script/ci-install-compiler +4 -0
- data/ext/libsass/script/ci-install-deps +19 -0
- data/ext/libsass/script/ci-report-coverage +25 -0
- data/ext/libsass/script/coveralls-debug +32 -0
- data/ext/libsass/script/spec +5 -0
- data/ext/libsass/script/tap-driver +652 -0
- data/ext/libsass/script/tap-runner +1 -0
- data/ext/libsass/source_map.cpp +133 -0
- data/ext/libsass/source_map.hpp +46 -0
- data/ext/libsass/subset_map.hpp +145 -0
- data/ext/libsass/support/libsass.pc.in +11 -0
- data/ext/libsass/test-driver +127 -0
- data/ext/libsass/test/test_node.cpp +98 -0
- data/ext/libsass/test/test_paths.cpp +29 -0
- data/ext/libsass/test/test_selector_difference.cpp +28 -0
- data/ext/libsass/test/test_specificity.cpp +28 -0
- data/ext/libsass/test/test_subset_map.cpp +472 -0
- data/ext/libsass/test/test_superselector.cpp +71 -0
- data/ext/libsass/test/test_unification.cpp +33 -0
- data/ext/libsass/to_c.cpp +61 -0
- data/ext/libsass/to_c.hpp +44 -0
- data/ext/libsass/to_string.cpp +29 -0
- data/ext/libsass/to_string.hpp +32 -0
- data/ext/libsass/token.hpp +32 -0
- data/ext/libsass/units.cpp +54 -0
- data/ext/libsass/units.hpp +10 -0
- data/ext/libsass/utf8.h +34 -0
- data/ext/libsass/utf8/checked.h +327 -0
- data/ext/libsass/utf8/core.h +329 -0
- data/ext/libsass/utf8/unchecked.h +228 -0
- data/ext/libsass/utf8_string.cpp +102 -0
- data/ext/libsass/utf8_string.hpp +36 -0
- data/ext/libsass/util.cpp +189 -0
- data/ext/libsass/util.hpp +26 -0
- data/ext/libsass/win/libsass.filters +291 -0
- data/ext/libsass/win/libsass.sln +28 -0
- data/ext/libsass/win/libsass.vcxproj +255 -0
- data/lib/sassc.rb +6 -0
- data/lib/sassc/engine.rb +13 -0
- data/lib/sassc/native.rb +44 -0
- data/lib/sassc/native/native_context_api.rb +140 -0
- data/lib/sassc/native/native_functions_api.rb +41 -0
- data/lib/sassc/native/sass_input_style.rb +11 -0
- data/lib/sassc/native/sass_output_style.rb +10 -0
- data/lib/sassc/native/sass_value.rb +95 -0
- data/lib/sassc/native/string_list.rb +8 -0
- data/lib/sassc/version.rb +3 -0
- data/sassc.gemspec +43 -0
- data/test/smoke_test.rb +171 -0
- data/test/test_helper.rb +4 -0
- metadata +281 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
|
|
2
|
+
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
3
|
+
# Visual Studio 2013
|
|
4
|
+
VisualStudioVersion = 12.0.30723.0
|
|
5
|
+
MinimumVisualStudioVersion = 10.0.40219.1
|
|
6
|
+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsass", "libsass.vcxproj", "{E4030474-AFC9-4CC6-BEB6-D846F631502B}"
|
|
7
|
+
EndProject
|
|
8
|
+
Global
|
|
9
|
+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
10
|
+
Debug|Win32 = Debug|Win32
|
|
11
|
+
Debug|Win64 = Debug|Win64
|
|
12
|
+
Release|Win32 = Release|Win32
|
|
13
|
+
Release|Win64 = Release|Win64
|
|
14
|
+
EndGlobalSection
|
|
15
|
+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
16
|
+
{E4030474-AFC9-4CC6-BEB6-D846F631502B}.Debug|Win32.ActiveCfg = Debug|Win32
|
|
17
|
+
{E4030474-AFC9-4CC6-BEB6-D846F631502B}.Debug|Win32.Build.0 = Debug|Win32
|
|
18
|
+
{E4030474-AFC9-4CC6-BEB6-D846F631502B}.Debug|Win64.ActiveCfg = Debug|x64
|
|
19
|
+
{E4030474-AFC9-4CC6-BEB6-D846F631502B}.Debug|Win64.Build.0 = Debug|x64
|
|
20
|
+
{E4030474-AFC9-4CC6-BEB6-D846F631502B}.Release|Win32.ActiveCfg = Release|Win32
|
|
21
|
+
{E4030474-AFC9-4CC6-BEB6-D846F631502B}.Release|Win32.Build.0 = Release|Win32
|
|
22
|
+
{E4030474-AFC9-4CC6-BEB6-D846F631502B}.Release|Win64.ActiveCfg = Release|x64
|
|
23
|
+
{E4030474-AFC9-4CC6-BEB6-D846F631502B}.Release|Win64.Build.0 = Release|x64
|
|
24
|
+
EndGlobalSection
|
|
25
|
+
GlobalSection(SolutionProperties) = preSolution
|
|
26
|
+
HideSolutionNode = FALSE
|
|
27
|
+
EndGlobalSection
|
|
28
|
+
EndGlobal
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
3
|
+
<ItemGroup Label="ProjectConfigurations">
|
|
4
|
+
<ProjectConfiguration Include="Debug|Win32">
|
|
5
|
+
<Configuration>Debug</Configuration>
|
|
6
|
+
<Platform>Win32</Platform>
|
|
7
|
+
</ProjectConfiguration>
|
|
8
|
+
<ProjectConfiguration Include="Debug|x64">
|
|
9
|
+
<Configuration>Debug</Configuration>
|
|
10
|
+
<Platform>x64</Platform>
|
|
11
|
+
</ProjectConfiguration>
|
|
12
|
+
<ProjectConfiguration Include="Release|Win32">
|
|
13
|
+
<Configuration>Release</Configuration>
|
|
14
|
+
<Platform>Win32</Platform>
|
|
15
|
+
</ProjectConfiguration>
|
|
16
|
+
<ProjectConfiguration Include="Release|x64">
|
|
17
|
+
<Configuration>Release</Configuration>
|
|
18
|
+
<Platform>x64</Platform>
|
|
19
|
+
</ProjectConfiguration>
|
|
20
|
+
</ItemGroup>
|
|
21
|
+
<PropertyGroup Label="Globals">
|
|
22
|
+
<ProjectGuid>{E4030474-AFC9-4CC6-BEB6-D846F631502B}</ProjectGuid>
|
|
23
|
+
<Keyword>Win32Proj</Keyword>
|
|
24
|
+
<RootNamespace>libsass</RootNamespace>
|
|
25
|
+
</PropertyGroup>
|
|
26
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
27
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
|
28
|
+
<ConfigurationType>Application</ConfigurationType>
|
|
29
|
+
<UseDebugLibraries>true</UseDebugLibraries>
|
|
30
|
+
<PlatformToolset>v120</PlatformToolset>
|
|
31
|
+
<CharacterSet>Unicode</CharacterSet>
|
|
32
|
+
</PropertyGroup>
|
|
33
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
34
|
+
<ConfigurationType>Application</ConfigurationType>
|
|
35
|
+
<UseDebugLibraries>true</UseDebugLibraries>
|
|
36
|
+
<PlatformToolset>v120</PlatformToolset>
|
|
37
|
+
<CharacterSet>Unicode</CharacterSet>
|
|
38
|
+
</PropertyGroup>
|
|
39
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
|
40
|
+
<ConfigurationType>Application</ConfigurationType>
|
|
41
|
+
<UseDebugLibraries>false</UseDebugLibraries>
|
|
42
|
+
<PlatformToolset>v120</PlatformToolset>
|
|
43
|
+
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
44
|
+
<CharacterSet>Unicode</CharacterSet>
|
|
45
|
+
</PropertyGroup>
|
|
46
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
47
|
+
<ConfigurationType>Application</ConfigurationType>
|
|
48
|
+
<UseDebugLibraries>false</UseDebugLibraries>
|
|
49
|
+
<PlatformToolset>v120</PlatformToolset>
|
|
50
|
+
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
51
|
+
<CharacterSet>Unicode</CharacterSet>
|
|
52
|
+
</PropertyGroup>
|
|
53
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
54
|
+
<ImportGroup Label="ExtensionSettings">
|
|
55
|
+
</ImportGroup>
|
|
56
|
+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
57
|
+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
58
|
+
</ImportGroup>
|
|
59
|
+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
|
60
|
+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
61
|
+
</ImportGroup>
|
|
62
|
+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
63
|
+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
64
|
+
</ImportGroup>
|
|
65
|
+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
|
66
|
+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
67
|
+
</ImportGroup>
|
|
68
|
+
<PropertyGroup Label="UserMacros" />
|
|
69
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
70
|
+
<LinkIncremental>true</LinkIncremental>
|
|
71
|
+
<TargetName>sassc</TargetName>
|
|
72
|
+
<OutDir>$(SolutionDir)bin\Debug\</OutDir>
|
|
73
|
+
<IntDir>$(SolutionDir)bin\Debug\obj\</IntDir>
|
|
74
|
+
</PropertyGroup>
|
|
75
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
76
|
+
<LinkIncremental>true</LinkIncremental>
|
|
77
|
+
<TargetName>sassc</TargetName>
|
|
78
|
+
<OutDir>$(SolutionDir)bin\Debug\</OutDir>
|
|
79
|
+
<IntDir>$(SolutionDir)bin\Debug\obj\</IntDir>
|
|
80
|
+
</PropertyGroup>
|
|
81
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
82
|
+
<LinkIncremental>false</LinkIncremental>
|
|
83
|
+
<TargetName>sassc</TargetName>
|
|
84
|
+
<OutDir>$(SolutionDir)bin\</OutDir>
|
|
85
|
+
<IntDir>$(SolutionDir)bin\obj</IntDir>
|
|
86
|
+
</PropertyGroup>
|
|
87
|
+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
88
|
+
<LinkIncremental>false</LinkIncremental>
|
|
89
|
+
<TargetName>sassc</TargetName>
|
|
90
|
+
<OutDir>$(SolutionDir)bin\</OutDir>
|
|
91
|
+
<IntDir>$(SolutionDir)bin\obj\</IntDir>
|
|
92
|
+
</PropertyGroup>
|
|
93
|
+
<ItemDefinitionGroup>
|
|
94
|
+
<ClCompile>
|
|
95
|
+
<AdditionalIncludeDirectories>..;..\posix;..\sassc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
96
|
+
</ClCompile>
|
|
97
|
+
</ItemDefinitionGroup>
|
|
98
|
+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
99
|
+
<ClCompile>
|
|
100
|
+
<PrecompiledHeader>
|
|
101
|
+
</PrecompiledHeader>
|
|
102
|
+
<WarningLevel>Level3</WarningLevel>
|
|
103
|
+
<Optimization>Disabled</Optimization>
|
|
104
|
+
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
105
|
+
</ClCompile>
|
|
106
|
+
<Link>
|
|
107
|
+
<SubSystem>Console</SubSystem>
|
|
108
|
+
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
109
|
+
</Link>
|
|
110
|
+
</ItemDefinitionGroup>
|
|
111
|
+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
112
|
+
<ClCompile>
|
|
113
|
+
<PrecompiledHeader>
|
|
114
|
+
</PrecompiledHeader>
|
|
115
|
+
<WarningLevel>Level3</WarningLevel>
|
|
116
|
+
<Optimization>Disabled</Optimization>
|
|
117
|
+
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
118
|
+
</ClCompile>
|
|
119
|
+
<Link>
|
|
120
|
+
<SubSystem>Console</SubSystem>
|
|
121
|
+
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
122
|
+
</Link>
|
|
123
|
+
</ItemDefinitionGroup>
|
|
124
|
+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
125
|
+
<ClCompile>
|
|
126
|
+
<WarningLevel>Level3</WarningLevel>
|
|
127
|
+
<PrecompiledHeader>
|
|
128
|
+
</PrecompiledHeader>
|
|
129
|
+
<Optimization>MaxSpeed</Optimization>
|
|
130
|
+
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
131
|
+
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
132
|
+
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
133
|
+
</ClCompile>
|
|
134
|
+
<Link>
|
|
135
|
+
<SubSystem>Console</SubSystem>
|
|
136
|
+
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
137
|
+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
138
|
+
<OptimizeReferences>true</OptimizeReferences>
|
|
139
|
+
</Link>
|
|
140
|
+
</ItemDefinitionGroup>
|
|
141
|
+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
142
|
+
<ClCompile>
|
|
143
|
+
<WarningLevel>Level3</WarningLevel>
|
|
144
|
+
<PrecompiledHeader>
|
|
145
|
+
</PrecompiledHeader>
|
|
146
|
+
<Optimization>MaxSpeed</Optimization>
|
|
147
|
+
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
148
|
+
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
149
|
+
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
150
|
+
</ClCompile>
|
|
151
|
+
<Link>
|
|
152
|
+
<SubSystem>Console</SubSystem>
|
|
153
|
+
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
154
|
+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
155
|
+
<OptimizeReferences>true</OptimizeReferences>
|
|
156
|
+
</Link>
|
|
157
|
+
</ItemDefinitionGroup>
|
|
158
|
+
<ItemGroup>
|
|
159
|
+
<ClCompile Include="..\posix\getopt.c" />
|
|
160
|
+
<ClCompile Include="..\ast.cpp" />
|
|
161
|
+
<ClCompile Include="..\base64vlq.cpp" />
|
|
162
|
+
<ClCompile Include="..\bind.cpp" />
|
|
163
|
+
<ClCompile Include="..\cencode.c" />
|
|
164
|
+
<ClCompile Include="..\constants.cpp" />
|
|
165
|
+
<ClCompile Include="..\context.cpp" />
|
|
166
|
+
<ClCompile Include="..\contextualize.cpp" />
|
|
167
|
+
<ClCompile Include="..\copy_c_str.cpp" />
|
|
168
|
+
<ClCompile Include="..\error_handling.cpp" />
|
|
169
|
+
<ClCompile Include="..\eval.cpp" />
|
|
170
|
+
<ClCompile Include="..\expand.cpp" />
|
|
171
|
+
<ClCompile Include="..\extend.cpp" />
|
|
172
|
+
<ClCompile Include="..\file.cpp" />
|
|
173
|
+
<ClCompile Include="..\functions.cpp" />
|
|
174
|
+
<ClCompile Include="..\inspect.cpp" />
|
|
175
|
+
<ClCompile Include="..\json.cpp" />
|
|
176
|
+
<ClCompile Include="..\node.cpp" />
|
|
177
|
+
<ClCompile Include="..\output_compressed.cpp" />
|
|
178
|
+
<ClCompile Include="..\output_nested.cpp" />
|
|
179
|
+
<ClCompile Include="..\parser.cpp" />
|
|
180
|
+
<ClCompile Include="..\prelexer.cpp" />
|
|
181
|
+
<ClCompile Include="..\remove_placeholders.cpp" />
|
|
182
|
+
<ClCompile Include="..\sass.cpp" />
|
|
183
|
+
<ClCompile Include="..\sass2scss.cpp" />
|
|
184
|
+
<ClCompile Include="..\sass_interface.cpp" />
|
|
185
|
+
<ClCompile Include="..\sass_context.cpp" />
|
|
186
|
+
<ClCompile Include="..\sass_functions.cpp" />
|
|
187
|
+
<ClCompile Include="..\sass_values.cpp" />
|
|
188
|
+
<ClCompile Include="..\sass_util.cpp" />
|
|
189
|
+
<ClCompile Include="..\source_map.cpp" />
|
|
190
|
+
<ClCompile Include="..\to_c.cpp" />
|
|
191
|
+
<ClCompile Include="..\to_string.cpp" />
|
|
192
|
+
<ClCompile Include="..\units.cpp" />
|
|
193
|
+
<ClCompile Include="..\utf8_string.cpp" />
|
|
194
|
+
<ClCompile Include="..\util.cpp" />
|
|
195
|
+
<ClCompile Include="..\sassc\sassc.c" />
|
|
196
|
+
</ItemGroup>
|
|
197
|
+
<ItemGroup>
|
|
198
|
+
<ClInclude Include="..\ast.hpp" />
|
|
199
|
+
<ClInclude Include="..\ast_def_macros.hpp" />
|
|
200
|
+
<ClInclude Include="..\ast_factory.hpp" />
|
|
201
|
+
<ClInclude Include="..\ast_fwd_decl.hpp" />
|
|
202
|
+
<ClInclude Include="..\backtrace.hpp" />
|
|
203
|
+
<ClInclude Include="..\base64vlq.hpp" />
|
|
204
|
+
<ClInclude Include="..\bind.hpp" />
|
|
205
|
+
<ClInclude Include="..\color_names.hpp" />
|
|
206
|
+
<ClInclude Include="..\constants.hpp" />
|
|
207
|
+
<ClInclude Include="..\context.hpp" />
|
|
208
|
+
<ClInclude Include="..\contextualize.hpp" />
|
|
209
|
+
<ClInclude Include="..\copy_c_str.hpp" />
|
|
210
|
+
<ClInclude Include="..\debug.hpp" />
|
|
211
|
+
<ClInclude Include="..\environment.hpp" />
|
|
212
|
+
<ClInclude Include="..\error_handling.hpp" />
|
|
213
|
+
<ClInclude Include="..\eval.hpp" />
|
|
214
|
+
<ClInclude Include="..\expand.hpp" />
|
|
215
|
+
<ClInclude Include="..\extend.hpp" />
|
|
216
|
+
<ClInclude Include="..\file.hpp" />
|
|
217
|
+
<ClInclude Include="..\functions.hpp" />
|
|
218
|
+
<ClInclude Include="..\inspect.hpp" />
|
|
219
|
+
<ClInclude Include="..\json.hpp" />
|
|
220
|
+
<ClInclude Include="..\kwd_arg_macros.hpp" />
|
|
221
|
+
<ClInclude Include="..\mapping.hpp" />
|
|
222
|
+
<ClInclude Include="..\memory_manager.hpp" />
|
|
223
|
+
<ClInclude Include="..\node.hpp" />
|
|
224
|
+
<ClInclude Include="..\operation.hpp" />
|
|
225
|
+
<ClInclude Include="..\output_compressed.hpp" />
|
|
226
|
+
<ClInclude Include="..\output_nested.hpp" />
|
|
227
|
+
<ClInclude Include="..\parser.hpp" />
|
|
228
|
+
<ClInclude Include="..\paths.hpp" />
|
|
229
|
+
<ClInclude Include="..\position.hpp" />
|
|
230
|
+
<ClInclude Include="..\prelexer.hpp" />
|
|
231
|
+
<ClInclude Include="..\remove_placeholders.hpp" />
|
|
232
|
+
<ClInclude Include="..\sass.h" />
|
|
233
|
+
<ClInclude Include="..\sass2scss.h" />
|
|
234
|
+
<ClInclude Include="..\sass_context.h" />
|
|
235
|
+
<ClInclude Include="..\sass_functions.h" />
|
|
236
|
+
<ClInclude Include="..\sass_interface.h" />
|
|
237
|
+
<ClInclude Include="..\sass_values.h" />
|
|
238
|
+
<ClInclude Include="..\sass_util.hpp" />
|
|
239
|
+
<ClInclude Include="..\source_map.hpp" />
|
|
240
|
+
<ClInclude Include="..\subset_map.hpp" />
|
|
241
|
+
<ClInclude Include="..\token.hpp" />
|
|
242
|
+
<ClInclude Include="..\to_c.hpp" />
|
|
243
|
+
<ClInclude Include="..\to_string.hpp" />
|
|
244
|
+
<ClInclude Include="..\units.hpp" />
|
|
245
|
+
<ClInclude Include="..\utf8.h" />
|
|
246
|
+
<ClInclude Include="..\utf8\checked.h" />
|
|
247
|
+
<ClInclude Include="..\utf8\core.h" />
|
|
248
|
+
<ClInclude Include="..\utf8\unchecked.h" />
|
|
249
|
+
<ClInclude Include="..\utf8_string.hpp" />
|
|
250
|
+
<ClInclude Include="..\util.hpp" />
|
|
251
|
+
</ItemGroup>
|
|
252
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
253
|
+
<ImportGroup Label="ExtensionTargets">
|
|
254
|
+
</ImportGroup>
|
|
255
|
+
</Project>
|
data/lib/sassc.rb
ADDED
data/lib/sassc/engine.rb
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module SassC
|
|
2
|
+
class Engine
|
|
3
|
+
def initialize(template, options = {})
|
|
4
|
+
#@options = self.class.normalize_options(options)
|
|
5
|
+
@template = template
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def render
|
|
9
|
+
return _to_tree.render unless @options[:quiet]
|
|
10
|
+
Sass::Util.silence_sass_warnings {_to_tree.render}
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
data/lib/sassc/native.rb
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
require "ffi"
|
|
2
|
+
|
|
3
|
+
module SassC
|
|
4
|
+
module Native
|
|
5
|
+
extend FFI::Library
|
|
6
|
+
ffi_lib 'ext/libsass/lib/libsass.so'
|
|
7
|
+
|
|
8
|
+
require_relative "native/sass_value"
|
|
9
|
+
|
|
10
|
+
typedef :pointer, :sass_options_ptr
|
|
11
|
+
typedef :pointer, :sass_context_ptr
|
|
12
|
+
typedef :pointer, :sass_file_context_ptr
|
|
13
|
+
typedef :pointer, :sass_data_context_ptr
|
|
14
|
+
|
|
15
|
+
typedef :pointer, :sass_c_function_list_ptr
|
|
16
|
+
typedef :pointer, :sass_c_function_callback_ptr
|
|
17
|
+
typedef :pointer, :sass_value_ptr
|
|
18
|
+
|
|
19
|
+
callback :sass_c_function, [:pointer, :pointer], :pointer
|
|
20
|
+
|
|
21
|
+
require_relative "native/sass_input_style"
|
|
22
|
+
require_relative "native/sass_output_style"
|
|
23
|
+
require_relative "native/string_list"
|
|
24
|
+
|
|
25
|
+
# Remove the redundant "sass_" from the beginning of every method name
|
|
26
|
+
def self.attach_function(*args)
|
|
27
|
+
super if args.size != 3
|
|
28
|
+
|
|
29
|
+
if args[0] =~ /^sass_/
|
|
30
|
+
args.unshift args[0].to_s.sub(/^sass_/, "")
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
super(*args)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# https://github.com/ffi/ffi/wiki/Examples#array-of-strings
|
|
37
|
+
def self.return_string_array(ptr)
|
|
38
|
+
ptr.read_pointer.null? ? [] : ptr.get_array_of_string(0).compact
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
require_relative "native/native_context_api"
|
|
42
|
+
require_relative "native/native_functions_api"
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
module SassC
|
|
2
|
+
module Native
|
|
3
|
+
attach_function :version, :libsass_version, [], :string
|
|
4
|
+
|
|
5
|
+
# Create and initialize an option struct
|
|
6
|
+
# ADDAPI struct Sass_Options* ADDCALL sass_make_options (void);
|
|
7
|
+
attach_function :sass_make_options, [], :sass_options_ptr
|
|
8
|
+
|
|
9
|
+
# Create and initialize a specific context
|
|
10
|
+
# ADDAPI struct Sass_File_Context* ADDCALL sass_make_file_context (const char* input_path);
|
|
11
|
+
# ADDAPI struct Sass_Data_Context* ADDCALL sass_make_data_context (char* source_string);
|
|
12
|
+
attach_function :sass_make_file_context, [:string], :sass_file_context_ptr
|
|
13
|
+
attach_function :sass_make_data_context, [:string], :sass_data_context_ptr
|
|
14
|
+
|
|
15
|
+
# Call the compilation step for the specific context
|
|
16
|
+
# ADDAPI int ADDCALL sass_compile_file_context (struct Sass_File_Context* ctx);
|
|
17
|
+
# ADDAPI int ADDCALL sass_compile_data_context (struct Sass_Data_Context* ctx);
|
|
18
|
+
attach_function :sass_compile_file_context, [:sass_file_context_ptr], :int
|
|
19
|
+
attach_function :sass_compile_data_context, [:sass_data_context_ptr], :int
|
|
20
|
+
|
|
21
|
+
# Create a sass compiler instance for more control
|
|
22
|
+
# ADDAPI struct Sass_Compiler* ADDCALL sass_make_file_compiler (struct Sass_File_Context* file_ctx);
|
|
23
|
+
# ADDAPI struct Sass_Compiler* ADDCALL sass_make_data_compiler (struct Sass_Data_Context* data_ctx);
|
|
24
|
+
|
|
25
|
+
# Execute the different compilation steps individually
|
|
26
|
+
# Usefull if you only want to query the included files
|
|
27
|
+
# ADDAPI int ADDCALL sass_compiler_parse(struct Sass_Compiler* compiler);
|
|
28
|
+
# ADDAPI int ADDCALL sass_compiler_execute(struct Sass_Compiler* compiler);
|
|
29
|
+
|
|
30
|
+
# Release all memory allocated with the compiler
|
|
31
|
+
# This does _not_ include any contexts or options
|
|
32
|
+
# ADDAPI void ADDCALL sass_delete_compiler(struct Sass_Compiler* compiler);
|
|
33
|
+
|
|
34
|
+
# Release all memory allocated and also ourself
|
|
35
|
+
# ADDAPI void ADDCALL sass_delete_file_context (struct Sass_File_Context* ctx);
|
|
36
|
+
# ADDAPI void ADDCALL sass_delete_data_context (struct Sass_Data_Context* ctx);
|
|
37
|
+
attach_function :sass_delete_file_context, [:sass_file_context_ptr], :void
|
|
38
|
+
attach_function :sass_delete_data_context, [:sass_data_context_ptr], :void
|
|
39
|
+
|
|
40
|
+
# Getters for context from specific implementation
|
|
41
|
+
# ADDAPI struct Sass_Context* ADDCALL sass_file_context_get_context (struct Sass_File_Context* file_ctx);
|
|
42
|
+
# ADDAPI struct Sass_Context* ADDCALL sass_data_context_get_context (struct Sass_Data_Context* data_ctx);
|
|
43
|
+
attach_function :sass_file_context_get_context, [:sass_file_context_ptr], :sass_context_ptr
|
|
44
|
+
attach_function :sass_data_context_get_context, [:sass_data_context_ptr], :sass_context_ptr
|
|
45
|
+
|
|
46
|
+
# Getters for context options from Sass_Context
|
|
47
|
+
# ADDAPI struct Sass_Options* ADDCALL sass_context_get_options (struct Sass_Context* ctx);
|
|
48
|
+
# ADDAPI struct Sass_Options* ADDCALL sass_file_context_get_options (struct Sass_File_Context* file_ctx);
|
|
49
|
+
# ADDAPI struct Sass_Options* ADDCALL sass_data_context_get_options (struct Sass_Data_Context* data_ctx);
|
|
50
|
+
# ADDAPI void ADDCALL sass_file_context_set_options (struct Sass_File_Context* file_ctx, struct Sass_Options* opt);
|
|
51
|
+
# ADDAPI void ADDCALL sass_data_context_set_options (struct Sass_Data_Context* data_ctx, struct Sass_Options* opt);
|
|
52
|
+
attach_function :sass_context_get_options, [:sass_context_ptr], :sass_options_ptr
|
|
53
|
+
attach_function :sass_file_context_get_options, [:sass_file_context_ptr], :sass_options_ptr
|
|
54
|
+
attach_function :sass_data_context_get_options, [:sass_data_context_ptr], :sass_options_ptr
|
|
55
|
+
attach_function :sass_file_context_set_options, [:sass_file_context_ptr, :sass_options_ptr], :void
|
|
56
|
+
attach_function :sass_data_context_set_options, [:sass_data_context_ptr, :sass_options_ptr], :void
|
|
57
|
+
|
|
58
|
+
# Getters for options
|
|
59
|
+
# ADDAPI int ADDCALL sass_option_get_precision (struct Sass_Options* options);
|
|
60
|
+
# ADDAPI enum Sass_Output_Style ADDCALL sass_option_get_output_style (struct Sass_Options* options);
|
|
61
|
+
# ADDAPI bool ADDCALL sass_option_get_source_comments (struct Sass_Options* options);
|
|
62
|
+
# ADDAPI bool ADDCALL sass_option_get_source_map_embed (struct Sass_Options* options);
|
|
63
|
+
# ADDAPI bool ADDCALL sass_option_get_source_map_contents (struct Sass_Options* options);
|
|
64
|
+
# ADDAPI bool ADDCALL sass_option_get_omit_source_map_url (struct Sass_Options* options);
|
|
65
|
+
# ADDAPI bool ADDCALL sass_option_get_is_indented_syntax_src (struct Sass_Options* options);
|
|
66
|
+
# ADDAPI const char* ADDCALL sass_option_get_input_path (struct Sass_Options* options);
|
|
67
|
+
# ADDAPI const char* ADDCALL sass_option_get_output_path (struct Sass_Options* options);
|
|
68
|
+
# ADDAPI const char* ADDCALL sass_option_get_image_path (struct Sass_Options* options);
|
|
69
|
+
# ADDAPI const char* ADDCALL sass_option_get_include_path (struct Sass_Options* options);
|
|
70
|
+
# ADDAPI const char* ADDCALL sass_option_get_source_map_file (struct Sass_Options* options);
|
|
71
|
+
# ADDAPI Sass_C_Function_List ADDCALL sass_option_get_c_functions (struct Sass_Options* options);
|
|
72
|
+
attach_function :sass_option_get_precision, [:sass_options_ptr], :int
|
|
73
|
+
attach_function :sass_option_get_output_style, [:sass_options_ptr], SassOutputStyle
|
|
74
|
+
attach_function :sass_option_get_source_comments, [:sass_options_ptr], :bool
|
|
75
|
+
attach_function :sass_option_get_source_map_embed, [:sass_options_ptr], :bool
|
|
76
|
+
attach_function :sass_option_get_source_map_contents, [:sass_options_ptr], :bool
|
|
77
|
+
attach_function :sass_option_get_omit_source_map_url, [:sass_options_ptr], :bool
|
|
78
|
+
attach_function :sass_option_get_is_indented_syntax_src, [:sass_options_ptr], :bool
|
|
79
|
+
attach_function :sass_option_get_input_path, [:sass_options_ptr], :string
|
|
80
|
+
attach_function :sass_option_get_output_path, [:sass_options_ptr], :string
|
|
81
|
+
attach_function :sass_option_get_image_path, [:sass_options_ptr], :string
|
|
82
|
+
attach_function :sass_option_get_include_path, [:sass_options_ptr], :string
|
|
83
|
+
attach_function :sass_option_get_source_map_file, [:sass_options_ptr], :string
|
|
84
|
+
attach_function :sass_option_get_c_functions, [:sass_options_ptr], :sass_c_function_list_ptr
|
|
85
|
+
# ADDAPI Sass_C_Import_Callback ADDCALL sass_option_get_importer (struct Sass_Options* options);
|
|
86
|
+
|
|
87
|
+
# Setters for options
|
|
88
|
+
# ADDAPI void ADDCALL sass_option_set_precision (struct Sass_Options* options, int precision);
|
|
89
|
+
# ADDAPI void ADDCALL sass_option_set_output_style (struct Sass_Options* options, enum Sass_Output_Style output_style);
|
|
90
|
+
# ADDAPI void ADDCALL sass_option_set_source_comments (struct Sass_Options* options, bool source_comments);
|
|
91
|
+
# ADDAPI void ADDCALL sass_option_set_source_map_embed (struct Sass_Options* options, bool source_map_embed);
|
|
92
|
+
# ADDAPI void ADDCALL sass_option_set_source_map_contents (struct Sass_Options* options, bool source_map_contents);
|
|
93
|
+
# ADDAPI void ADDCALL sass_option_set_omit_source_map_url (struct Sass_Options* options, bool omit_source_map_url);
|
|
94
|
+
# ADDAPI void ADDCALL sass_option_set_is_indented_syntax_src (struct Sass_Options* options, bool is_indented_syntax_src);
|
|
95
|
+
# ADDAPI void ADDCALL sass_option_set_input_path (struct Sass_Options* options, const char* input_path);
|
|
96
|
+
# ADDAPI void ADDCALL sass_option_set_output_path (struct Sass_Options* options, const char* output_path);
|
|
97
|
+
# ADDAPI void ADDCALL sass_option_set_image_path (struct Sass_Options* options, const char* image_path);
|
|
98
|
+
# ADDAPI void ADDCALL sass_option_set_include_path (struct Sass_Options* options, const char* include_path);
|
|
99
|
+
# ADDAPI void ADDCALL sass_option_set_source_map_file (struct Sass_Options* options, const char* source_map_file);
|
|
100
|
+
# ADDAPI void ADDCALL sass_option_set_c_functions (struct Sass_Options* options, Sass_C_Function_List c_functions);
|
|
101
|
+
attach_function :sass_option_set_precision, [:sass_options_ptr, :int], :void
|
|
102
|
+
attach_function :sass_option_set_output_style, [:sass_options_ptr, SassOutputStyle], :void
|
|
103
|
+
attach_function :sass_option_set_source_comments, [:sass_options_ptr, :bool], :void
|
|
104
|
+
attach_function :sass_option_set_source_map_embed, [:sass_options_ptr, :bool], :void
|
|
105
|
+
attach_function :sass_option_set_source_map_contents, [:sass_options_ptr, :bool], :void
|
|
106
|
+
attach_function :sass_option_set_omit_source_map_url, [:sass_options_ptr, :bool], :void
|
|
107
|
+
attach_function :sass_option_set_is_indented_syntax_src, [:sass_options_ptr, :bool], :void
|
|
108
|
+
attach_function :sass_option_set_input_path, [:sass_options_ptr, :string], :void
|
|
109
|
+
attach_function :sass_option_set_output_path, [:sass_options_ptr, :string], :void
|
|
110
|
+
attach_function :sass_option_set_image_path, [:sass_options_ptr, :string], :void
|
|
111
|
+
attach_function :sass_option_set_include_path, [:sass_options_ptr, :string], :void
|
|
112
|
+
attach_function :sass_option_set_source_map_file, [:sass_options_ptr, :string], :void
|
|
113
|
+
attach_function :sass_option_set_c_functions, [:sass_options_ptr, :pointer], :void
|
|
114
|
+
# ADDAPI void ADDCALL sass_option_set_importer (struct Sass_Options* options, Sass_C_Import_Callback importer);
|
|
115
|
+
|
|
116
|
+
# Getter for context
|
|
117
|
+
# ADDAPI const char* ADDCALL sass_context_get_output_string (struct Sass_Context* ctx);
|
|
118
|
+
# ADDAPI int ADDCALL sass_context_get_error_status (struct Sass_Context* ctx);
|
|
119
|
+
# ADDAPI const char* ADDCALL sass_context_get_error_json (struct Sass_Context* ctx);
|
|
120
|
+
# ADDAPI const char* ADDCALL sass_context_get_error_message (struct Sass_Context* ctx);
|
|
121
|
+
# ADDAPI const char* ADDCALL sass_context_get_error_file (struct Sass_Context* ctx);
|
|
122
|
+
# ADDAPI size_t ADDCALL sass_context_get_error_line (struct Sass_Context* ctx);
|
|
123
|
+
# ADDAPI size_t ADDCALL sass_context_get_error_column (struct Sass_Context* ctx);
|
|
124
|
+
# ADDAPI const char* ADDCALL sass_context_get_source_map_string (struct Sass_Context* ctx);
|
|
125
|
+
# ADDAPI char** ADDCALL sass_context_get_included_files (struct Sass_Context* ctx);
|
|
126
|
+
attach_function :sass_context_get_output_string, [:sass_context_ptr], :string
|
|
127
|
+
attach_function :sass_context_get_error_status, [:sass_context_ptr], :int
|
|
128
|
+
attach_function :sass_context_get_error_json, [:sass_context_ptr], :string
|
|
129
|
+
attach_function :sass_context_get_error_message, [:sass_context_ptr], :string
|
|
130
|
+
attach_function :sass_context_get_error_file, [:sass_context_ptr], :string
|
|
131
|
+
attach_function :sass_context_get_error_line, [:sass_context_ptr], :size_t
|
|
132
|
+
attach_function :sass_context_get_error_column, [:sass_context_ptr], :size_t
|
|
133
|
+
attach_function :sass_context_get_source_map_string, [:sass_context_ptr], :string
|
|
134
|
+
attach_function :_context_get_included_files, :sass_context_get_included_files, [:sass_context_ptr], :pointer
|
|
135
|
+
|
|
136
|
+
def self.context_get_included_files(*args)
|
|
137
|
+
return_string_array _context_get_included_files(*args)
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|