Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
node-sass
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
楚学文
node-sass
Commits
d7db05f0
Commit
d7db05f0
authored
Apr 22, 2012
by
Hampton Catlin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:hcatlin/libsass
parents
81270ce2
364ed866
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
22 deletions
+10
-22
interpolation.scss
interpolation.scss
+7
-0
sassc.c
sassc.c
+2
-21
document_parser.cpp
src/document_parser.cpp
+1
-1
No files found.
interpolation.scss
View file @
d7db05f0
...
@@ -34,3 +34,9 @@ div {
...
@@ -34,3 +34,9 @@ div {
d
:
d
;
d
:
d
;
+
bar
;
+
bar
;
}
}
div
{
color
:
blah
blah
;
*
color
:
blah
bloo
;
_color
:
foo
boo
;
}
\ No newline at end of file
sassc.c
View file @
d7db05f0
//
// This is when you want to compile a whole folder of stuff
//
// var opts = sass_new_context();
// opts->sassPath = "/Users/hcatlin/dev/asset/stylesheet";
// opts->cssPath = "/Users/hcatlin/dev/asset/stylesheets/.css";
// opts->includePaths = "/Users/hcatlin/dev/asset/stylesheets:/Users/hcatlin/sasslib";
// opts->outputStyle => SASS_STYLE_COMPRESSED;
// sass_compile(opts, &callbackfunction);
//
//
// This is when you want to compile a string
//
// opts = sass_new_context();
// opts->inputString = "a { width: 50px; }";
// opts->includePaths = "/Users/hcatlin/dev/asset/stylesheets:/Users/hcatlin/sasslib";
// opts->outputStyle => SASS_STYLE_EXPANDED;
// var cssResult = sass_compile(opts, &callbackfunction);
#include <stdio.h>
#include <stdio.h>
#include "src/sass_interface.h"
#include "src/sass_interface.h"
int
main
(
int
argc
,
char
**
argv
)
int
main
(
int
argc
,
char
**
argv
)
{
{
if
(
argc
<
2
)
{
if
(
argc
<
2
)
{
printf
(
"
Hey, I need an input file!
\n
"
);
printf
(
"
Usage: sassc [INPUT FILE]
\n
"
);
return
0
;
return
0
;
}
}
struct
sass_file_context
*
ctx
=
sass_new_file_context
();
struct
sass_file_context
*
ctx
=
sass_new_file_context
();
ctx
->
options
.
include_paths
=
"
::/blah/bloo/fuzz:/slub/flub/chub::/Users/Aaron/dev/libsass/::::/huzz/buzz:::
"
;
ctx
->
options
.
include_paths
=
""
;
ctx
->
options
.
output_style
=
SASS_STYLE_NESTED
;
ctx
->
options
.
output_style
=
SASS_STYLE_NESTED
;
ctx
->
input_path
=
argv
[
1
];
ctx
->
input_path
=
argv
[
1
];
...
...
src/document_parser.cpp
View file @
d7db05f0
...
@@ -498,7 +498,7 @@ namespace Sass {
...
@@ -498,7 +498,7 @@ namespace Sass {
Node
Document
::
parse_rule
()
{
Node
Document
::
parse_rule
()
{
Node
rule
(
Node
::
rule
,
context
.
registry
,
line_number
,
2
);
Node
rule
(
Node
::
rule
,
context
.
registry
,
line_number
,
2
);
if
(
!
lex
<
identifier
>
())
syntax_error
(
"invalid property name"
);
if
(
!
lex
<
sequence
<
optional
<
exactly
<
'*'
>
>
,
identifier
>
>
())
syntax_error
(
"invalid property name"
);
rule
<<
Node
(
Node
::
property
,
line_number
,
lexed
);
rule
<<
Node
(
Node
::
property
,
line_number
,
lexed
);
if
(
!
lex
<
exactly
<
':'
>
>
())
syntax_error
(
"property
\"
"
+
lexed
.
to_string
()
+
"
\"
must be followed by a ':'"
);
if
(
!
lex
<
exactly
<
':'
>
>
())
syntax_error
(
"property
\"
"
+
lexed
.
to_string
()
+
"
\"
must be followed by a ':'"
);
rule
<<
parse_list
();
rule
<<
parse_list
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment