Separate spec helpers files for compiler and runtime specs

This commit is contained in:
Max Brunsfeld 2014-03-08 15:26:27 -08:00
parent b167ee84fa
commit 142671c177
24 changed files with 99 additions and 71 deletions

View file

@ -1,23 +0,0 @@
#include "spec_helper.h"
#include "rules/character_set.h"
string src_dir() {
const char * dir = getenv("TREESITTER_DIR");
if (!dir) dir = getenv("PWD");
return dir;
}
namespace tree_sitter {
namespace rules {
rule_ptr character(const set<CharacterRange> &ranges) {
return make_shared<CharacterSet>(ranges);
}
rule_ptr character(const set<CharacterRange> &ranges, bool sign) {
if (sign)
return character(ranges);
else
return CharacterSet(ranges).complement().copy();
}
}
}