Sha256: c415a6bfb21f3b94c869963464036e460f1625595228f2a8bd49e466c4392529

Contents?: true

Size: 1.24 KB

Versions: 52

Compression:

Stored size: 1.24 KB

Contents

#ifndef SASS_SOURCE_MAP_H
#define SASS_SOURCE_MAP_H

#include <string>
#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 {

  class Context;
  class OutputBuffer;

  class SourceMap {

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

    void append(const Offset& offset);
    void prepend(const Offset& offset);
    void append(const OutputBuffer& out);
    void prepend(const OutputBuffer& out);
    void add_open_mapping(const AST_Node_Ptr node);
    void add_close_mapping(const AST_Node_Ptr node);

    std::string render_srcmap(Context &ctx);
    ParserState remap(const ParserState& pstate);

  private:

    std::string serialize_mappings();

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

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

}

#endif

Version data entries

52 entries across 50 versions & 16 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/node-sass/src/libsass/src/source_map.hpp
optimacms-0.1.61 spec/dummy/node_modules/@rails/webpacker/node_modules/node-sass/src/libsass/src/source_map.hpp
disco_app-0.18.0 test/dummy/node_modules/node-sass/src/libsass/src/source_map.hpp
disco_app-0.18.2 test/dummy/node_modules/node-sass/src/libsass/src/source_map.hpp
tang-0.2.1 spec/tang_app/node_modules/node-sass/src/libsass/src/source_map.hpp
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/node-sass/src/libsass/src/source_map.hpp
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/node-sass/src/libsass/src/source_map.hpp
ruby2js-4.0.4 lib/tasks/testrails/node_modules/node-sass/src/libsass/src/source_map.hpp
ruby2js-4.0.3 lib/tasks/testrails/node_modules/node-sass/src/libsass/src/source_map.hpp
tang-0.2.0 spec/tang_app/node_modules/node-sass/src/libsass/src/source_map.hpp
tang-0.1.0 spec/tang_app/node_modules/node-sass/src/libsass/src/source_map.hpp
tang-0.0.9 spec/tang_app/node_modules/node-sass/src/libsass/src/source_map.hpp
enju_library-0.3.8 spec/dummy/node_modules/node-sass/src/libsass/src/source_map.hpp
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/sassc-2.0.0/ext/libsass/src/source_map.hpp
ilog-0.4.1 node_modules/node-sass/src/libsass/src/source_map.hpp
ilog-0.4.0 node_modules/node-sass/src/libsass/src/source_map.hpp
ilog-0.3.3 node_modules/node-sass/src/libsass/src/source_map.hpp
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/sassc-2.0.1/ext/libsass/src/source_map.hpp
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/sassc-2.0.1/ext/libsass/src/source_map.hpp
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/sassc-2.0.1/ext/libsass/src/source_map.hpp