Sha256: 8828b7429664e509ce8af9a9046300df3f1b3872e6bf4264e64fb968a5c721fe

Contents?: true

Size: 1.84 KB

Versions: 8

Compression:

Stored size: 1.84 KB

Contents

#define SASS_EXPAND

#include <vector>
#include <map>
#include <iostream>

#ifndef SASS_AST
#include "ast.hpp"
#endif

#ifndef SASS_OPERATION
#include "operation.hpp"
#endif

#ifndef SASS_ENVIRONMENT
#include "environment.hpp"
#endif

namespace Sass {
  using namespace std;

  struct Context;
  class Eval;
  class Contextualize;
  typedef Environment<AST_Node*> Env;
  struct Backtrace;

  class Expand : public Operation_CRTP<Statement*, Expand> {

    Context&          ctx;
    Eval*             eval;
    Contextualize*    contextualize;
    Env*              env;
    vector<Block*>    block_stack;
    vector<String*>   property_stack;
    vector<Selector*> selector_stack;
    Backtrace*        backtrace;

    Statement* fallback_impl(AST_Node* n);

  public:
    Expand(Context&, Eval*, Contextualize*, Env*, Backtrace*);
    virtual ~Expand() { }

    using Operation<Statement*>::operator();

    Statement* operator()(Block*);
    Statement* operator()(Ruleset*);
    Statement* operator()(Propset*);
    Statement* operator()(Media_Block*);
    Statement* operator()(Feature_Block*);
    Statement* operator()(At_Rule*);
    Statement* operator()(Declaration*);
    Statement* operator()(Assignment*);
    Statement* operator()(Import*);
    Statement* operator()(Import_Stub*);
    Statement* operator()(Warning*);
    Statement* operator()(Error*);
    Statement* operator()(Debug*);
    Statement* operator()(Comment*);
    Statement* operator()(If*);
    Statement* operator()(For*);
    Statement* operator()(Each*);
    Statement* operator()(While*);
    Statement* operator()(Return*);
    Statement* operator()(Extension*);
    Statement* operator()(Definition*);
    Statement* operator()(Mixin_Call*);
    Statement* operator()(Content*);

    template <typename U>
    Statement* fallback(U x) { return fallback_impl(x); }

    void append_block(Block*);
  };

}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sassc-0.0.9 ext/libsass/expand.hpp
sassc-0.0.8 ext/libsass/expand.hpp
sassc-0.0.7 ext/libsass/expand.hpp
sassc-0.0.6 ext/libsass/expand.hpp
sassc-0.0.5 ext/libsass/expand.hpp
sassc-0.0.4 ext/libsass/expand.hpp
sassc-0.0.2 ext/libsass/expand.hpp
sassc-0.0.1 ext/libsass/expand.hpp