Blame src/constants.cpp

Packit Service 7770af
#include "sass.hpp"
Packit Service 7770af
#include "constants.hpp"
Packit Service 7770af
Packit Service 7770af
namespace Sass {
Packit Service 7770af
  namespace Constants {
Packit Service 7770af
Packit Service 7770af
    extern const unsigned long MaxCallStack = 1024;
Packit Service 7770af
Packit Service 7770af
    // https://github.com/sass/libsass/issues/592
Packit Service 7770af
    // https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity
Packit Service 7770af
    // https://github.com/sass/sass/issues/1495#issuecomment-61189114
Packit Service 7770af
    extern const unsigned long Specificity_Star = 0;
Packit Service 7770af
    extern const unsigned long Specificity_Universal = 0;
Packit Service 7770af
    extern const unsigned long Specificity_Element = 1;
Packit Service 7770af
    extern const unsigned long Specificity_Base = 1000;
Packit Service 7770af
    extern const unsigned long Specificity_Class = 1000;
Packit Service 7770af
    extern const unsigned long Specificity_Attr = 1000;
Packit Service 7770af
    extern const unsigned long Specificity_Pseudo = 1000;
Packit Service 7770af
    extern const unsigned long Specificity_ID = 1000000;
Packit Service 7770af
Packit Service 7770af
    // sass keywords
Packit Service 7770af
    extern const char at_root_kwd[]       = "@at-root";
Packit Service 7770af
    extern const char import_kwd[]        = "@import";
Packit Service 7770af
    extern const char mixin_kwd[]         = "@mixin";
Packit Service 7770af
    extern const char function_kwd[]      = "@function";
Packit Service 7770af
    extern const char return_kwd[]        = "@return";
Packit Service 7770af
    extern const char include_kwd[]       = "@include";
Packit Service 7770af
    extern const char content_kwd[]       = "@content";
Packit Service 7770af
    extern const char extend_kwd[]        = "@extend";
Packit Service 7770af
    extern const char if_kwd[]            = "@if";
Packit Service 7770af
    extern const char else_kwd[]          = "@else";
Packit Service 7770af
    extern const char if_after_else_kwd[] = "if";
Packit Service 7770af
    extern const char for_kwd[]           = "@for";
Packit Service 7770af
    extern const char from_kwd[]          = "from";
Packit Service 7770af
    extern const char to_kwd[]            = "to";
Packit Service 7770af
    extern const char through_kwd[]       = "through";
Packit Service 7770af
    extern const char each_kwd[]          = "@each";
Packit Service 7770af
    extern const char in_kwd[]            = "in";
Packit Service 7770af
    extern const char while_kwd[]         = "@while";
Packit Service 7770af
    extern const char warn_kwd[]          = "@warn";
Packit Service 7770af
    extern const char error_kwd[]         = "@error";
Packit Service 7770af
    extern const char debug_kwd[]         = "@debug";
Packit Service 7770af
    extern const char default_kwd[]       = "default";
Packit Service 7770af
    extern const char global_kwd[]        = "global";
Packit Service 7770af
    extern const char null_kwd[]          = "null";
Packit Service 7770af
    extern const char optional_kwd[]      = "optional";
Packit Service 7770af
    extern const char with_kwd[]          = "with";
Packit Service 7770af
    extern const char without_kwd[]       = "without";
Packit Service 7770af
    extern const char all_kwd[]           = "all";
Packit Service 7770af
    extern const char rule_kwd[]          = "rule";
Packit Service 7770af
Packit Service 7770af
    // css standard units
Packit Service 7770af
    extern const char em_kwd[]   = "em";
Packit Service 7770af
    extern const char ex_kwd[]   = "ex";
Packit Service 7770af
    extern const char px_kwd[]   = "px";
Packit Service 7770af
    extern const char cm_kwd[]   = "cm";
Packit Service 7770af
    extern const char mm_kwd[]   = "mm";
Packit Service 7770af
    extern const char pt_kwd[]   = "pt";
Packit Service 7770af
    extern const char pc_kwd[]   = "pc";
Packit Service 7770af
    extern const char deg_kwd[]  = "deg";
Packit Service 7770af
    extern const char rad_kwd[]  = "rad";
Packit Service 7770af
    extern const char grad_kwd[] = "grad";
Packit Service 7770af
    extern const char turn_kwd[] = "turn";
Packit Service 7770af
    extern const char ms_kwd[]   = "ms";
Packit Service 7770af
    extern const char s_kwd[]    = "s";
Packit Service 7770af
    extern const char Hz_kwd[]   = "Hz";
Packit Service 7770af
    extern const char kHz_kwd[]  = "kHz";
Packit Service 7770af
Packit Service 7770af
    // vendor prefixes
Packit Service 7770af
    extern const char vendor_opera_kwd[]    = "-o-";
Packit Service 7770af
    extern const char vendor_webkit_kwd[]   = "-webkit-";
Packit Service 7770af
    extern const char vendor_mozilla_kwd[]  = "-moz-";
Packit Service 7770af
    extern const char vendor_ms_kwd[]       = "-ms-";
Packit Service 7770af
    extern const char vendor_khtml_kwd[]    = "-khtml-";
Packit Service 7770af
Packit Service 7770af
    // css functions and keywords
Packit Service 7770af
    extern const char charset_kwd[]      = "@charset";
Packit Service 7770af
    extern const char media_kwd[]        = "@media";
Packit Service 7770af
    extern const char supports_kwd[]     = "@supports";
Packit Service 7770af
    extern const char keyframes_kwd[]    = "keyframes";
Packit Service 7770af
    extern const char only_kwd[]         = "only";
Packit Service 7770af
    extern const char rgb_kwd[]          = "rgb(";
Packit Service 7770af
    extern const char url_kwd[]          = "url";
Packit Service 7770af
    // extern const char url_prefix_kwd[]   = "url-prefix(";
Packit Service 7770af
    extern const char important_kwd[]    = "important";
Packit Service 7770af
    extern const char pseudo_not_kwd[]   = ":not(";
Packit Service 7770af
    extern const char even_kwd[]         = "even";
Packit Service 7770af
    extern const char odd_kwd[]          = "odd";
Packit Service 7770af
    extern const char progid_kwd[]       = "progid";
Packit Service 7770af
    extern const char expression_kwd[]   = "expression";
Packit Service 7770af
    extern const char calc_fn_kwd[]      = "calc";
Packit Service 7770af
Packit Service 7770af
    extern const char almost_any_value_class[] = "\"'#!;{}";
Packit Service 7770af
Packit Service 7770af
    // css selector keywords
Packit Service 7770af
    extern const char sel_deep_kwd[] = "/deep/";
Packit Service 7770af
Packit Service 7770af
    // css attribute-matching operators
Packit Service 7770af
    extern const char tilde_equal[]  = "~=";
Packit Service 7770af
    extern const char pipe_equal[]   = "|=";
Packit Service 7770af
    extern const char caret_equal[]  = "^=";
Packit Service 7770af
    extern const char dollar_equal[] = "$=";
Packit Service 7770af
    extern const char star_equal[]   = "*=";
Packit Service 7770af
Packit Service 7770af
    // relational & logical operators and constants
Packit Service 7770af
    extern const char and_kwd[]   = "and";
Packit Service 7770af
    extern const char or_kwd[]    = "or";
Packit Service 7770af
    extern const char not_kwd[]   = "not";
Packit Service 7770af
    extern const char gt[]        = ">";
Packit Service 7770af
    extern const char gte[]       = ">=";
Packit Service 7770af
    extern const char lt[]        = "<";
Packit Service 7770af
    extern const char lte[]       = "<=";
Packit Service 7770af
    extern const char eq[]        = "==";
Packit Service 7770af
    extern const char neq[]       = "!=";
Packit Service 7770af
    extern const char true_kwd[]  = "true";
Packit Service 7770af
    extern const char false_kwd[] = "false";
Packit Service 7770af
Packit Service 7770af
    // miscellaneous punctuation and delimiters
Packit Service 7770af
    extern const char percent_str[]     = "%";
Packit Service 7770af
    extern const char empty_str[]       = "";
Packit Service 7770af
    extern const char slash_slash[]     = "//";
Packit Service 7770af
    extern const char slash_star[]      = "/*";
Packit Service 7770af
    extern const char star_slash[]      = "*/";
Packit Service 7770af
    extern const char hash_lbrace[]     = "#{";
Packit Service 7770af
    extern const char rbrace[]          = "}";
Packit Service 7770af
    extern const char rparen[]          = ")";
Packit Service 7770af
    extern const char sign_chars[]      = "-+";
Packit Service 7770af
    extern const char op_chars[]        = "-+";
Packit Service 7770af
    extern const char hyphen[]          = "-";
Packit Service 7770af
    extern const char ellipsis[]        = "...";
Packit Service 7770af
    // extern const char url_space_chars[] = " \t\r\n\f";
Packit Service 7770af
    // type names
Packit Service 7770af
    extern const char numeric_name[]    = "numeric value";
Packit Service 7770af
    extern const char number_name[]     = "number";
Packit Service 7770af
    extern const char percentage_name[] = "percentage";
Packit Service 7770af
    extern const char dimension_name[]  = "numeric dimension";
Packit Service 7770af
    extern const char string_name[]     = "string";
Packit Service 7770af
    extern const char bool_name[]       = "bool";
Packit Service 7770af
    extern const char color_name[]      = "color";
Packit Service 7770af
    extern const char list_name[]       = "list";
Packit Service 7770af
    extern const char map_name[]        = "map";
Packit Service 7770af
    extern const char arglist_name[]    = "arglist";
Packit Service 7770af
Packit Service 7770af
    // constants for uri parsing (RFC 3986 Appendix A.)
Packit Service 7770af
    extern const char uri_chars[]  = ":;/?!%&#@|[]{}'`^\"*+-.,_=~";
Packit Service 7770af
    extern const char real_uri_chars[]  = "#%&";
Packit Service 7770af
Packit Service 7770af
    // some specific constant character classes
Packit Service 7770af
    // they must be static to be useable by lexer
Packit Service 7770af
    extern const char static_ops[]      = "*/%";
Packit Service 7770af
    // some character classes for the parser
Packit Service 7770af
    extern const char selector_list_delims[] = "){};!";
Packit Service 7770af
    extern const char complex_selector_delims[] = ",){};!";
Packit Service 7770af
    extern const char selector_combinator_ops[] = "+~>";
Packit Service 7770af
    // optional modifiers for alternative compare context
Packit Service 7770af
    extern const char attribute_compare_modifiers[] = "~|^$*";
Packit Service 7770af
    extern const char selector_lookahead_ops[] = "*&%,()[]";
Packit Service 7770af
Packit Service 7770af
    // byte order marks
Packit Service 7770af
    // (taken from http://en.wikipedia.org/wiki/Byte_order_mark)
Packit Service 7770af
    extern const unsigned char utf_8_bom[]      = { 0xEF, 0xBB, 0xBF };
Packit Service 7770af
    extern const unsigned char utf_16_bom_be[]  = { 0xFE, 0xFF };
Packit Service 7770af
    extern const unsigned char utf_16_bom_le[]  = { 0xFF, 0xFE };
Packit Service 7770af
    extern const unsigned char utf_32_bom_be[]  = { 0x00, 0x00, 0xFE, 0xFF };
Packit Service 7770af
    extern const unsigned char utf_32_bom_le[]  = { 0xFF, 0xFE, 0x00, 0x00 };
Packit Service 7770af
    extern const unsigned char utf_7_bom_1[]    = { 0x2B, 0x2F, 0x76, 0x38 };
Packit Service 7770af
    extern const unsigned char utf_7_bom_2[]    = { 0x2B, 0x2F, 0x76, 0x39 };
Packit Service 7770af
    extern const unsigned char utf_7_bom_3[]    = { 0x2B, 0x2F, 0x76, 0x2B };
Packit Service 7770af
    extern const unsigned char utf_7_bom_4[]    = { 0x2B, 0x2F, 0x76, 0x2F };
Packit Service 7770af
    extern const unsigned char utf_7_bom_5[]    = { 0x2B, 0x2F, 0x76, 0x38, 0x2D };
Packit Service 7770af
    extern const unsigned char utf_1_bom[]      = { 0xF7, 0x64, 0x4C };
Packit Service 7770af
    extern const unsigned char utf_ebcdic_bom[] = { 0xDD, 0x73, 0x66, 0x73 };
Packit Service 7770af
    extern const unsigned char scsu_bom[]       = { 0x0E, 0xFE, 0xFF };
Packit Service 7770af
    extern const unsigned char bocu_1_bom[]     = { 0xFB, 0xEE, 0x28 };
Packit Service 7770af
    extern const unsigned char gb_18030_bom[]   = { 0x84, 0x31, 0x95, 0x33 };
Packit Service 7770af
Packit Service 7770af
  }
Packit Service 7770af
}