pike.git / module.pmod.in

version» Context lines:

pike.git/module.pmod.in:19:   //!   //! @example   //! @code   //! Tools.Sass.Compiler compiler = Tools.Sass.Compiler();   //!   //! // Allow for HTTP imports, disallowed by default.   //! compiler->http_import = Tools.Sass.HTTP_IMPORT_ANY;   //!   //! // Minify the output and create a source map file.   //! compiler->set_options(([ - //! "output_style" : Tools.Sass.STYLE_COMPRESSED + //! "output_style" : Tools.Sass.STYLE_COMPRESSED,   //! "source_map_file" : "path/to/write/source.map"   //! ]));   //!   //! if (mixed e = catch(compiler->compile_file("input.scss", "output.css"))) {   //! werror("Failed compiling input.scss to output.css\n");   //! }   //! @endcode   class Compiler   {    //! @ignore
pike.git/module.pmod.in:116:    }       return data;    }    //! @endignore          // Documented in the CMOD    void `include_path=(string(8bit) path)    { -  if (check_file_access && !Stdio.exist(path)) { +  if (check_file_access && stringp(path) && !Stdio.exist(path)) {    error("Include path %q does not exist!\n", path);    }       ::include_path = path;    }          // Documented in the CMOD -  string `include_path() +  string(8bit) `include_path()    {    return ::include_path;    }    -  +     //! Compile the file @[input_file] and return the result    //!    //! @param input_file    //! The SCSS file to compile    //!    //! @returns    //! A mapping with the generated CSS and source mapping file if such is    //! set to be generated    //!    //! @mapping
pike.git/module.pmod.in:235:    //! @member bool "omit_source_map_url"    //! Omit the #sourceMappingURL or not.    //! See also @[omit_source_map_url]    //! @endmapping    void set_options(mapping(string(8bit):string(8bit)|int) opts)    {    foreach (opts; string opt; string|int val) {    switch (opt)    {    case "output_style": -  if (!intp(val)) { -  error("Value to `output_style` must be an integer!\n"); -  } +     if (!(< STYLE_NESTED, STYLE_COMPRESSED, STYLE_COMPACT,    STYLE_EXPANDED >)[val])    {    error("Unrecognized output style value!\n");    }    output_style = val;    break;       case "include_path": -  if (!stringp(val)) { -  error("Value to `include_path` must be a string!\n"); -  } +     include_path = val;    break;       case "source_map_file": -  if (!stringp(val)) { -  error("Value to `source_map_file` must be a string!\n"); -  } +     source_map_file = val;    break;       case "source_map_embed": -  if (!intp(val)) { -  error("Value to `source_map_embed` must be an int(0..1)!\n"); -  } +     source_map_embed = val;    break;       case "source_map_root": -  if (!stringp(val)) { -  error("Value to `source_map_root` must be a string!\n"); -  } +     source_map_root = val;    break;       case "omit_source_map_url": -  if (!intp(val)) { -  error("Value to `omit_source_map_url` must be an integer!\n"); -  } +     omit_source_map_url = val;    break;       case "source_comments": -  if (!intp(val)) { -  error("Value to `source_comments` must be an integer!\n"); -  } +     source_comments = val;    break;    -  +  case "precision": +  precision = val; +  break; +     default:    error("Unknown option %O!\n", opt);    }    }    }   }