Sha256: 844885337152bf82f0c9d6d3b4ab768a868ac9c8cda7edc71cac7282b66b5d6a

Contents?: true

Size: 1.26 KB

Versions: 17

Compression:

Stored size: 1.26 KB

Contents

#ifndef SASS_SOURCE_MAP_H
#define SASS_SOURCE_MAP_H

#include <vector>

#include "ast_fwd_decl.hpp"
#include "base64vlq.hpp"
#include "position.hpp"
#include "mapping.hpp"

#define VECTOR_PUSH(vec, ins) vec.insert(vec.end(), ins.begin(), ins.end())
#define VECTOR_UNSHIFT(vec, ins) vec.insert(vec.begin(), ins.begin(), ins.end())

namespace Sass {
  using std::vector;

  class Context;
  class OutputBuffer;

  class SourceMap {

  public:
    vector<size_t> source_index;
    SourceMap();
    SourceMap(const string& file);

    void setFile(const string& str) {
      file = str;
    }
    void append(const Offset& offset);
    void prepend(const Offset& offset);
    void append(const OutputBuffer& out);
    void prepend(const OutputBuffer& out);
    void add_open_mapping(AST_Node* node);
    void add_close_mapping(AST_Node* node);

    string generate_source_map(Context &ctx);
    ParserState remap(const ParserState& pstate);

  private:

    string serialize_mappings();

    vector<Mapping> mappings;
    Position current_position;
public:
    string file;
private:
    Base64VLQ base64vlq;
  };

  class OutputBuffer {
    public:
      OutputBuffer(void)
      : buffer(""),
        smap()
      { }
    public:
      string buffer;
      SourceMap smap;
  };

}

#endif

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
gulp_assets-1.0.0.pre.5 template/node_modules/gulp-sass/node_modules/node-sass/src/libsass/source_map.hpp
gulp_assets-1.0.0.pre.4 template/node_modules/gulp-sass/node_modules/node-sass/src/libsass/source_map.hpp
gulp_assets-1.0.0.pre.3 template/node_modules/gulp-sass/node_modules/node-sass/src/libsass/source_map.hpp
sassc-1.7.1 ext/libsass/source_map.hpp
sassc-1.7.0 ext/libsass/source_map.hpp
sassc-1.6.0 ext/libsass/source_map.hpp
sassc-1.5.1 ext/libsass/source_map.hpp
sassc-1.5.0 ext/libsass/source_map.hpp
sassc-1.4.0 ext/libsass/source_map.hpp
sassc-1.3.0 ext/libsass/source_map.hpp
sassc-1.2.0 ext/libsass/source_map.hpp
sassc-1.1.2 ext/libsass/source_map.hpp
sassc-1.1.1 ext/libsass/source_map.hpp
sassc-1.1.0 ext/libsass/source_map.hpp
sassc-1.0.0 ext/libsass/source_map.hpp
sassc-0.0.11 ext/libsass/source_map.hpp
sassc-0.0.10 ext/libsass/source_map.hpp