Sha256: c5e7008614e957a869b5c27454bcfee0168bb229d7e740c2f851ead16795c85c

Contents?: true

Size: 1.06 KB

Versions: 6

Compression:

Stored size: 1.06 KB

Contents

#ifndef SASS_TO_VALUE_H
#define SASS_TO_VALUE_H

#include "operation.hpp"
#include "sass/values.h"
#include "ast_fwd_decl.hpp"

namespace Sass {

  class To_Value : public Operation_CRTP<Value*, To_Value> {

    Value* fallback_impl(AST_Node* n);

  private:

    Context& ctx;
    Memory_Manager& mem;

  public:

    To_Value(Context& ctx, Memory_Manager& mem)
    : ctx(ctx), mem(mem)
    { }
    ~To_Value() { }
    using Operation<Value*>::operator();

    Value* operator()(Argument*);
    Value* operator()(Boolean*);
    Value* operator()(Number*);
    Value* operator()(Color*);
    Value* operator()(String_Constant*);
    Value* operator()(String_Quoted*);
    Value* operator()(Custom_Warning*);
    Value* operator()(Custom_Error*);
    Value* operator()(List*);
    Value* operator()(Map*);
    Value* operator()(Null*);

    // convert to string via `To_String`
    Value* operator()(Selector_List*);
    Value* operator()(Binary_Expression*);

    // fallback throws error
    template <typename U>
    Value* fallback(U x) { return fallback_impl(x); }
  };

}

#endif

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
sassc-1.10.1 ext/libsass/src/to_value.hpp
sassc-1.10.0 ext/libsass/src/to_value.hpp
blackboard-3.1.9 lib/site_template/node_modules/node-sass/src/libsass/src/to_value.hpp
sassc-1.9.0 ext/libsass/src/to_value.hpp
sassc-1.8.5 ext/libsass/src/to_value.hpp
sassc-1.8.4 ext/libsass/src/to_value.hpp