CSS-Sass

 view release on metacpan or  search on metacpan

libsass/parser.hpp  view on Meta::CPAN

      after_token.add(it_before_token, it_after_token);

      // ToDo: could probably do this incremetal on original object (API wants offset?)
      pstate = ParserState(path, source, lexed, before_token, after_token - before_token);

      // advance internal char iterator
      return position = it_after_token;

    }

    // lex_css skips over space, tabs, line and block comment
    // all block comments will be consumed and thrown away
    // source-map position will point to token after the comment
    template <prelexer mx>
    const char* lex_css()
    {
      // copy old token
      Token prev = lexed;
      // throw away comments
      // update srcmap position
      lex < css_comments >();
      // now lex a new token
      const char* pos = lex< mx >();
      // maybe restore prev token
      if (pos == 0) lexed = prev;
      // return match
      return pos;
    }

    // all block comments will be skipped and thrown away
    template <prelexer mx>
    const char* peek_css(const char* start = 0)
    {
      // now peek a token (skip comments first)
      return peek< mx >(peek < css_comments >(start));
    }

#ifdef __clang__

#pragma clang diagnostic pop

#endif

    void error(string msg, Position pos);
    // generate message with given and expected sample
    // text before and in the middle are configurable
    void css_error(const string& msg,
                   const string& prefix = " after ",
                   const string& middle = ", was: ");
    void read_bom();

    Block* parse();
    Import* parse_import();
    Definition* parse_definition();
    Parameters* parse_parameters();
    Parameter* parse_parameter();
    Mixin_Call* parse_mixin_call();
    Arguments* parse_arguments(bool has_url = false);
    Argument* parse_argument(bool has_url = false);
    Assignment* parse_assignment();
    // Propset* parse_propset();
    Ruleset* parse_ruleset(Selector_Lookahead lookahead);
    Selector_Schema* parse_selector_schema(const char* end_of_selector);
    Selector_List* parse_selector_group();
    Complex_Selector* parse_selector_combination();
    Compound_Selector* parse_simple_selector_sequence();
    Simple_Selector* parse_simple_selector();
    Wrapped_Selector* parse_negated_selector();
    Simple_Selector* parse_pseudo_selector();
    Attribute_Selector* parse_attribute_selector();
    Block* parse_block();
    bool parse_number_prefix();
    Declaration* parse_declaration();
    Expression* parse_map_value();
    Expression* parse_map();
    Expression* parse_list();
    Expression* parse_comma_list();
    Expression* parse_space_list();
    Expression* parse_disjunction();
    Expression* parse_conjunction();
    Expression* parse_relation();
    Expression* parse_expression();
    Expression* parse_term();
    Expression* parse_factor();
    Expression* parse_value();
    Function_Call* parse_calc_function();
    Function_Call* parse_function_call();
    Function_Call_Schema* parse_function_call_schema();
    String* parse_interpolated_chunk(Token, bool constant = false);
    String* parse_string();
    String_Constant* parse_static_value();
    String* parse_ie_property();
    String* parse_ie_keyword_arg();
    String_Schema* parse_value_schema(const char* stop);
    String* parse_identifier_schema();
    // String_Schema* parse_url_schema();
    If* parse_if_directive(bool else_if = false);
    For* parse_for_directive();
    Each* parse_each_directive();
    While* parse_while_directive();
    Media_Block* parse_media_block();
    List* parse_media_queries();
    Media_Query* parse_media_query();
    Media_Query_Expression* parse_media_expression();
    Feature_Block* parse_feature_block();
    Feature_Query* parse_feature_queries();
    Feature_Query_Condition* parse_feature_query();
    Feature_Query_Condition* parse_feature_query_in_parens();
    Feature_Query_Condition* parse_supports_negation();
    Feature_Query_Condition* parse_supports_conjunction();
    Feature_Query_Condition* parse_supports_disjunction();
    Feature_Query_Condition* parse_supports_declaration();
    At_Root_Block* parse_at_root_block();
    At_Root_Expression* parse_at_root_expression();
    At_Rule* parse_at_rule();
    Warning* parse_warning();
    Error* parse_error();
    Debug* parse_debug();

    void parse_block_comments(Block* block);



( run in 0.694 second using v1.01-cache-2.11-cpan-71847e10f99 )