@@ -1014,7 +1014,7 @@ namespace Sass {
1014
1014
1015
1015
Expression* Parser::parse_map ()
1016
1016
{
1017
- To_String to_string (&ctx) ;
1017
+ ParserState opstate = pstate ;
1018
1018
Expression* key = parse_list ();
1019
1019
if (String_Quoted* str = dynamic_cast <String_Quoted*>(key)) {
1020
1020
if (!str->quote_mark () && !str->is_delayed ()) {
@@ -1035,7 +1035,7 @@ namespace Sass {
1035
1035
1036
1036
Expression* value = parse_space_list ();
1037
1037
1038
- Map* map = new (ctx.mem ) Map (pstate , 1 );
1038
+ Map* map = new (ctx.mem ) Map (opstate , 1 );
1039
1039
(*map) << make_pair (key, value);
1040
1040
1041
1041
while (lex_css< exactly<' ,' > >())
@@ -1064,8 +1064,15 @@ namespace Sass {
1064
1064
(*map) << make_pair (key, value);
1065
1065
}
1066
1066
1067
- if (map->has_duplicate_key ())
1068
- { error (" Duplicate key \" " + map->get_duplicate_key ()->perform (&to_string) + " \" in map " + map->perform (&to_string) + " ." , pstate); }
1067
+ // Check was moved to eval step
1068
+ // if (map->has_duplicate_key()) {
1069
+ // To_String to_string(&ctx);
1070
+ // error("Duplicate key \"" + map->get_duplicate_key()->perform(&to_string) + "\" in map " + map->perform(&to_string) + ".", pstate);
1071
+ // }
1072
+
1073
+ ParserState ps = map->pstate ();
1074
+ ps.offset = pstate - ps + pstate.offset ;
1075
+ map->pstate (ps);
1069
1076
1070
1077
return map;
1071
1078
}
0 commit comments