Separate spec helpers files for compiler and runtime specs
This commit is contained in:
parent
b167ee84fa
commit
142671c177
24 changed files with 99 additions and 71 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue