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
213cf18c
Commit
213cf18c
authored
Apr 03, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Still working on general built-in function framework.
parent
b7df7897
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
3 deletions
+33
-3
functions.cpp
functions.cpp
+32
-3
functions.hpp
functions.hpp
+1
-0
No files found.
functions.cpp
View file @
213cf18c
...
@@ -2,10 +2,38 @@
...
@@ -2,10 +2,38 @@
#include "node.hpp"
#include "node.hpp"
namespace
Sass
{
namespace
Sass
{
namespace
Functions
{
Node
rgb
(
const
Environment
&
bindings
)
{
extern
const
char
*
rgb_metadata
[]
=
{
"rgb"
,
"$red"
,
"$green"
,
"$blue"
,
0
};
Node
rgb
(
const
vector
<
Token
>&
param_names
,
const
Environment
&
bindings
)
{
Node
color
(
Node
::
numeric_color
,
0
,
3
);
color
<<
bindings
[
param_names
[
0
]]
<<
bindings
[
param_names
[
1
]]
<<
bindings
[
param_names
[
2
]];
return
color
;
}
extern
const
char
*
rgba_metadata
[]
=
{
"rgba"
,
"$red"
,
"$green"
,
"$blue"
,
"$alpha"
,
0
};
Node
rgba
(
const
vector
<
Token
>&
param_names
,
const
Environment
&
bindings
)
{
Node
color
(
Node
::
numeric_color
,
0
,
3
);
color
<<
bindings
[
param_names
[
0
]]
<<
bindings
[
param_names
[
1
]]
<<
bindings
[
param_names
[
2
]]
<<
bindings
[
param_names
[
3
]];
return
color
;
}
}
}
\ No newline at end of file
functions.hpp
View file @
213cf18c
...
@@ -8,6 +8,7 @@ namespace Sass {
...
@@ -8,6 +8,7 @@ namespace Sass {
string
name
;
string
name
;
Node
parameters
;
Node
parameters
;
vector
<
Token
>
param_names
;
Primitive
primitive
;
Primitive
primitive
;
Function
()
Function
()
...
...
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