@@ -909,45 +909,45 @@ namespace Sass {
909
909
if (lex< identifier >())
910
910
{ return context.new_Node (Node::identifier, path, line, lexed); }
911
911
912
- // if (lex< percentage >())
913
- // { return context.new_Node(Node::textual_percentage, path, line, lexed); }
912
+ if (lex< percentage >())
913
+ { return context.new_Node (Node::textual_percentage, path, line, lexed); }
914
914
915
- // if (lex< dimension >())
916
- // { return context.new_Node(Node::textual_dimension, path, line, lexed); }
915
+ if (lex< dimension >())
916
+ { return context.new_Node (Node::textual_dimension, path, line, lexed); }
917
917
918
- // if (lex< number >())
919
- // { return context.new_Node(Node::textual_number, path, line, lexed); }
918
+ if (lex< number >())
919
+ { return context.new_Node (Node::textual_number, path, line, lexed); }
920
920
921
- // if (lex< hex >())
922
- // { return context.new_Node(Node::textual_hex, path, line, lexed); }
921
+ if (lex< hex >())
922
+ { return context.new_Node (Node::textual_hex, path, line, lexed); }
923
923
924
- if (lex< percentage >())
925
- { return context.new_Node (path, line, atof (lexed.begin ), Node::numeric_percentage); }
924
+ // if (lex< percentage >())
925
+ // { return context.new_Node(path, line, atof(lexed.begin), Node::numeric_percentage); }
926
926
927
- if (lex< dimension >()) {
928
- return context.new_Node (path, line, atof (lexed.begin ),
929
- Token::make (Prelexer::number (lexed.begin ), lexed.end ));
930
- }
927
+ // if (lex< dimension >()) {
928
+ // return context.new_Node(path, line, atof(lexed.begin),
929
+ // Token::make(Prelexer::number(lexed.begin), lexed.end));
930
+ // }
931
931
932
- if (lex< number >())
933
- { return context.new_Node (path, line, atof (lexed.begin )); }
932
+ // if (lex< number >())
933
+ // { return context.new_Node(path, line, atof(lexed.begin)); }
934
934
935
- if (lex< hex >()) {
936
- Node triple (context.new_Node (Node::numeric_color, path, line, 4 ));
937
- Token hext (Token::make (lexed.begin +1 , lexed.end ));
938
- if (hext.length () == 6 ) {
939
- for (int i = 0 ; i < 6 ; i += 2 ) {
940
- triple << context.new_Node (path, line, static_cast <double >(strtol (string (hext.begin +i, 2 ).c_str (), NULL , 16 )));
941
- }
942
- }
943
- else {
944
- for (int i = 0 ; i < 3 ; ++i) {
945
- triple << context.new_Node (path, line, static_cast <double >(strtol (string (2 , hext.begin [i]).c_str (), NULL , 16 )));
946
- }
947
- }
948
- triple << context.new_Node (path, line, 1.0 );
949
- return triple;
950
- }
935
+ // if (lex< hex >()) {
936
+ // Node triple(context.new_Node(Node::numeric_color, path, line, 4));
937
+ // Token hext(Token::make(lexed.begin+1, lexed.end));
938
+ // if (hext.length() == 6) {
939
+ // for (int i = 0; i < 6; i += 2) {
940
+ // triple << context.new_Node(path, line, static_cast<double>(strtol(string(hext.begin+i, 2).c_str(), NULL, 16)));
941
+ // }
942
+ // }
943
+ // else {
944
+ // for (int i = 0; i < 3; ++i) {
945
+ // triple << context.new_Node(path, line, static_cast<double>(strtol(string(2, hext.begin[i]).c_str(), NULL, 16)));
946
+ // }
947
+ // }
948
+ // triple << context.new_Node(path, line, 1.0);
949
+ // return triple;
950
+ // }
951
951
952
952
if (peek< string_constant >())
953
953
{ return parse_string (); }
@@ -1022,30 +1022,34 @@ namespace Sass {
1022
1022
schema << context.new_Node (Node::identifier, path, line, lexed);
1023
1023
}
1024
1024
else if (lex< percentage >()) {
1025
- schema << context.new_Node (path, line, atof (lexed.begin ), Node::numeric_percentage);
1025
+ schema << context.new_Node (Node::textual_percentage, path, line, lexed);
1026
+ // schema << context.new_Node(path, line, atof(lexed.begin), Node::numeric_percentage);
1026
1027
}
1027
1028
else if (lex< dimension >()) {
1028
- schema << context.new_Node (path, line, atof (lexed.begin ),
1029
- Token::make (Prelexer::number (lexed.begin ), lexed.end ));
1029
+ schema << context.new_Node (Node::textual_dimension, path, line, lexed);
1030
+ // schema << context.new_Node(path, line, atof(lexed.begin),
1031
+ // Token::make(Prelexer::number(lexed.begin), lexed.end));
1030
1032
}
1031
1033
else if (lex< number >()) {
1032
- schema << context.new_Node (path, line, atof (lexed.begin ));
1034
+ schema << context.new_Node (Node::textual_number, path, line, lexed);
1035
+ // schema << context.new_Node(path, line, atof(lexed.begin));
1033
1036
}
1034
1037
else if (lex< hex >()) {
1035
- Node triple (context.new_Node (Node::numeric_color, path, line, 4 ));
1036
- Token hext (Token::make (lexed.begin +1 , lexed.end ));
1037
- if (hext.length () == 6 ) {
1038
- for (int i = 0 ; i < 6 ; i += 2 ) {
1039
- triple << context.new_Node (path, line, static_cast <double >(strtol (string (hext.begin +i, 2 ).c_str (), NULL , 16 )));
1040
- }
1041
- }
1042
- else {
1043
- for (int i = 0 ; i < 3 ; ++i) {
1044
- triple << context.new_Node (path, line, static_cast <double >(strtol (string (2 , hext.begin [i]).c_str (), NULL , 16 )));
1045
- }
1046
- }
1047
- triple << context.new_Node (path, line, 1.0 );
1048
- schema << triple;
1038
+ schema << context.new_Node (Node::textual_hex, path, line, lexed);
1039
+ // Node triple(context.new_Node(Node::numeric_color, path, line, 4));
1040
+ // Token hext(Token::make(lexed.begin+1, lexed.end));
1041
+ // if (hext.length() == 6) {
1042
+ // for (int i = 0; i < 6; i += 2) {
1043
+ // triple << context.new_Node(path, line, static_cast<double>(strtol(string(hext.begin+i, 2).c_str(), NULL, 16)));
1044
+ // }
1045
+ // }
1046
+ // else {
1047
+ // for (int i = 0; i < 3; ++i) {
1048
+ // triple << context.new_Node(path, line, static_cast<double>(strtol(string(2, hext.begin[i]).c_str(), NULL, 16)));
1049
+ // }
1050
+ // }
1051
+ // triple << context.new_Node(path, line, 1.0);
1052
+ // schema << triple;
1049
1053
}
1050
1054
else if (lex< string_constant >()) {
1051
1055
Node str (context.new_Node (Node::string_constant, path, line, lexed));
0 commit comments