Sha256: 28671b765db19b9e6158b07f1dfe02a51905336c75497825e243372453d1b236

Contents?: true

Size: 832 Bytes

Versions: 4

Compression:

Stored size: 832 Bytes

Contents

#ifndef SASS_TO_STRING_H
#define SASS_TO_STRING_H

#include <string>

#include "operation.hpp"

namespace Sass {

  class Context;
  class Null;

  class To_String : public Operation_CRTP<std::string, To_String> {
    // import all the class-specific methods and override as desired
    using Operation<std::string>::operator();
    // override this to define a catch-all
    std::string fallback_impl(AST_Node* n);

    Context* ctx;
    bool in_declaration;

  public:

    To_String(Context* ctx = 0, bool in_declaration = true);
    virtual ~To_String();

    std::string operator()(Null* n);
    std::string operator()(String_Schema*);
    std::string operator()(String_Quoted*);
    std::string operator()(String_Constant*);

    template <typename U>
    std::string fallback(U n) { return fallback_impl(n); }
  };
}

#endif

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
sassc-1.8.1 ext/libsass/src/to_string.hpp
sassc-1.8.0 ext/libsass/src/to_string.hpp
sassc-1.8.0.pre2 ext/libsass/src/to_string.hpp
sassc-1.8.0.pre1 ext/libsass/src/to_string.hpp