Sha256: 41663132f3b91bde17c73b881e7a2614f76f86d6fc3f68d0955e0240d65af010

Contents?: true

Size: 613 Bytes

Versions: 25

Compression:

Stored size: 613 Bytes

Contents

#include "../ast.hpp"
#include "../context.hpp"
#include "../parser.hpp"
#include "../to_string.hpp"
#include <string>
#include <iostream>

using namespace std;
using namespace Sass;

Context ctx = Context::Data();
To_String to_string;

Compound_Selector* selector(string src)
{ return Parser::from_c_str(src.c_str(), ctx, "", Position()).parse_simple_selector_sequence(); }

void diff(string s, string t)
{
  cout << s << " - " << t << " = " << selector(s + ";")->minus(selector(t + ";"), ctx)->perform(&to_string) << endl;
}

int main()
{
  diff(".a.b.c", ".c.b");
  diff(".a.b.c", ".fludge.b");

  return 0;
}

Version data entries

25 entries across 25 versions & 2 rubygems

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