Context::Context(Context::Data initializers) : mem(Memory_Manager<AST_Node>()), source_c_str (initializers.source_c_str()), sources (vector<const char*>()), include_paths (initializers.include_paths()), queue (vector<pair<string, const char*> >()), style_sheets (map<string, Block*>()), source_map (resolve_relative_path(initializers.output_path(), initializers.source_map_file(), get_cwd())), c_functions (vector<Sass_C_Function_Descriptor>()), image_path (initializers.image_path()), output_path (make_canonical_path(initializers.output_path())), source_comments (initializers.source_comments()), output_style (initializers.output_style()), source_map_file (make_canonical_path(initializers.source_map_file())), omit_source_map_url (initializers.omit_source_map_url()), names_to_colors (map<string, Color*>()), colors_to_names (map<int, string>()), precision (initializers.precision()), subset_map (Subset_Map<string, pair<Complex_Selector*, Compound_Selector*> >()) { cwd = get_cwd(); collect_include_paths(initializers.include_paths_c_str()); collect_include_paths(initializers.include_paths_array()); setup_color_map(); string entry_point = initializers.entry_point(); if (!entry_point.empty()) { string result(add_file(entry_point)); if (result.empty()) { throw "File to read not found or unreadable: " + entry_point; } } }
Context::Context(Context::Data initializers) : mem(Memory_Manager<AST_Node>()), source_c_str (initializers.source_c_str()), sources (vector<const char*>()), include_paths (initializers.include_paths()), queue (vector<pair<string, const char*> >()), style_sheets (map<string, Block*>()), source_map(File::base_name(initializers.entry_point())), image_path (initializers.image_path()), source_comments (initializers.source_comments()), source_maps (initializers.source_maps()), output_style (initializers.output_style()), source_map_file (initializers.source_map_file()), names_to_colors (map<string, Color*>()), colors_to_names (map<int, string>()) { cwd = get_cwd(); collect_include_paths(initializers.include_paths_c_str()); collect_include_paths(initializers.include_paths_array()); setup_color_map(); string entry_point = initializers.entry_point(); if (!entry_point.empty()) { string result(add_file(entry_point)); if (result.empty()) { throw entry_point; } } }
Context::Context(Context::Data initializers) : mem(Memory_Manager<AST_Node>()), source_c_str (initializers.source_c_str()), sources (vector<const char*>()), include_paths (initializers.include_paths()), queue (vector<Sass_Queued>()), style_sheets (map<string, Block*>()), source_map (resolve_relative_path(initializers.output_path(), initializers.source_map_file(), get_cwd())), c_functions (vector<Sass_C_Function_Callback>()), image_path (initializers.image_path()), input_path (make_canonical_path(initializers.input_path())), output_path (make_canonical_path(initializers.output_path())), source_comments (initializers.source_comments()), output_style (initializers.output_style()), source_map_file (make_canonical_path(initializers.source_map_file())), source_map_embed (initializers.source_map_embed()), source_map_contents (initializers.source_map_contents()), omit_source_map_url (initializers.omit_source_map_url()), is_indented_syntax_src (initializers.is_indented_syntax_src()), importer (initializers.importer()), names_to_colors (map<string, Color*>()), colors_to_names (map<int, string>()), precision (initializers.precision()), _skip_source_map_update (initializers._skip_source_map_update()), subset_map (Subset_Map<string, pair<Complex_Selector*, Compound_Selector*> >()) { cwd = get_cwd(); // enforce some safe defaults // used to create relative file links if (input_path == "") input_path = "stdin"; if (output_path == "") output_path = "stdout"; include_paths.push_back(cwd); collect_include_paths(initializers.include_paths_c_str()); collect_include_paths(initializers.include_paths_array()); setup_color_map(); string entry_point = initializers.entry_point(); if (!entry_point.empty()) { string result(add_file(entry_point)); if (result.empty()) { throw "File to read not found or unreadable: " + entry_point; } } }