Sha256: aef81b156accc1cac1c4e7f10642076740a60e74e0eaeb1c103933dc683141ac

Contents?: true

Size: 1.27 KB

Versions: 6

Compression:

Stored size: 1.27 KB

Contents

#ifndef SASS_OUTPUT_H
#define SASS_OUTPUT_H

#include <string>
#include <vector>

#include "util.hpp"
#include "inspect.hpp"
#include "operation.hpp"

namespace Sass {
  class Context;

  // Refactor to make it generic to find linefeed (look behind)
  inline bool ends_with(std::string const & value, std::string const & ending)
  {
    if (ending.size() > value.size()) return false;
    return std::equal(ending.rbegin(), ending.rend(), value.rbegin());
  }

  class Output : public Inspect {
  protected:
    using Inspect::operator();

  public:
    // change to Emitter
    Output(Context* ctx);
    virtual ~Output();

  protected:
    std::string charset;
    std::vector<AST_Node*> top_nodes;

  public:
    OutputBuffer get_buffer(void);

    virtual void operator()(Map*);
    virtual void operator()(Ruleset*);
    // virtual void operator()(Propset*);
    virtual void operator()(Supports_Block*);
    virtual void operator()(Media_Block*);
    virtual void operator()(At_Rule*);
    virtual void operator()(Keyframe_Rule*);
    virtual void operator()(Import*);
    virtual void operator()(Comment*);
    virtual void operator()(Number*);
    virtual void operator()(String_Quoted*);
    virtual void operator()(String_Constant*);

    void fallback_impl(AST_Node* n);

  };

}

#endif

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sassc-1.8.3 ext/libsass/src/output.hpp
sassc-1.8.2 ext/libsass/src/output.hpp
sassc-1.8.1 ext/libsass/src/output.hpp
sassc-1.8.0 ext/libsass/src/output.hpp
sassc-1.8.0.pre2 ext/libsass/src/output.hpp
sassc-1.8.0.pre1 ext/libsass/src/output.hpp