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
bd841192
Commit
bd841192
authored
May 23, 2012
by
Aaron Leung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-ordering some arguments.
parent
20265121
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
10 deletions
+18
-10
document.cpp
document.cpp
+2
-2
error.hpp
error.hpp
+4
-4
eval_apply.cpp
eval_apply.cpp
+10
-2
node.cpp
node.cpp
+2
-2
No files found.
document.cpp
View file @
bd841192
...
@@ -87,10 +87,10 @@ namespace Sass {
...
@@ -87,10 +87,10 @@ namespace Sass {
}
}
void
Document
::
throw_syntax_error
(
string
message
,
size_t
ln
)
void
Document
::
throw_syntax_error
(
string
message
,
size_t
ln
)
{
throw
Error
(
Error
::
syntax
,
ln
?
ln
:
line
,
path
,
message
);
}
{
throw
Error
(
Error
::
syntax
,
path
,
ln
?
ln
:
line
,
message
);
}
void
Document
::
throw_read_error
(
string
message
,
size_t
ln
)
void
Document
::
throw_read_error
(
string
message
,
size_t
ln
)
{
throw
Error
(
Error
::
read
,
ln
?
ln
:
line
,
path
,
message
);
}
{
throw
Error
(
Error
::
read
,
path
,
ln
?
ln
:
line
,
message
);
}
using
std
::
string
;
using
std
::
string
;
using
std
::
stringstream
;
using
std
::
stringstream
;
...
...
error.hpp
View file @
bd841192
...
@@ -4,12 +4,12 @@ namespace Sass {
...
@@ -4,12 +4,12 @@ namespace Sass {
enum
Type
{
read
,
write
,
syntax
,
evaluation
};
enum
Type
{
read
,
write
,
syntax
,
evaluation
};
Type
type
;
Type
type
;
size_t
line
_number
;
size_t
line
;
string
file_name
;
string
path
;
string
message
;
string
message
;
Error
(
Type
type
,
s
ize_t
line_number
,
string
file_nam
e
,
string
message
)
Error
(
Type
type
,
s
tring
path
,
size_t
lin
e
,
string
message
)
:
type
(
type
),
line_number
(
line_number
),
file_name
(
file_nam
e
),
message
(
message
)
:
type
(
type
),
path
(
path
),
line
(
lin
e
),
message
(
message
)
{
}
{
}
};
};
...
...
eval_apply.cpp
View file @
bd841192
...
@@ -11,12 +11,20 @@ namespace Sass {
...
@@ -11,12 +11,20 @@ namespace Sass {
string
fn
;
string
fn
;
if
(
path
)
{
if
(
path
)
{
const
char
*
end
=
Prelexer
::
string_constant
(
path
);
const
char
*
end
=
Prelexer
::
string_constant
(
path
);
if
(
end
)
fn
=
string
(
path
,
end
-
path
);
if
(
end
)
fn
=
path
.
substr
(
1
,
path
.
size
()
-
1
);
else
fn
=
string
(
path
)
;
else
fn
=
path
;
}
}
throw
Error
(
Error
::
evaluation
,
line
,
fn
,
message
);
throw
Error
(
Error
::
evaluation
,
line
,
fn
,
message
);
}
}
static
void
throw_eval_error
(
string
message
,
string
path
,
size_t
line
)
{
if
(
!
path
.
empty
()
&&
Prelexer
::
string_constant
(
path
.
c_str
()))
path
=
path
.
substr
(
1
,
path
.
size
()
-
1
);
throw
Error
(
Error
::
evaluation
,
path
,
line
,
message
);
}
Node
eval
(
Node
&
expr
,
Environment
&
env
,
map
<
pair
<
string
,
size_t
>
,
Function
>&
f_env
,
Node_Factory
&
new_Node
)
Node
eval
(
Node
&
expr
,
Environment
&
env
,
map
<
pair
<
string
,
size_t
>
,
Function
>&
f_env
,
Node_Factory
&
new_Node
)
{
{
switch
(
expr
.
type
)
switch
(
expr
.
type
)
...
...
node.cpp
View file @
bd841192
...
@@ -82,11 +82,11 @@ namespace Sass {
...
@@ -82,11 +82,11 @@ namespace Sass {
return
numeric_value
()
<
rhs
.
numeric_value
();
return
numeric_value
()
<
rhs
.
numeric_value
();
}
}
else
{
else
{
throw
Error
(
Error
::
evaluation
,
line
(),
path
(),
"incompatible units"
);
throw
Error
(
Error
::
evaluation
,
path
(),
line
(),
"incompatible units"
);
}
}
}
}
else
{
else
{
throw
Error
(
Error
::
evaluation
,
line
(),
path
(),
"incomparable types"
);
throw
Error
(
Error
::
evaluation
,
path
(),
line
(),
"incomparable types"
);
}
}
}
}
...
...
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