Reorganize compiler directory
This commit is contained in:
parent
023a0c4f70
commit
92cec5758f
51 changed files with 630 additions and 624 deletions
17
spec/compiler/compile_fixtures.cpp
Normal file
17
spec/compiler/compile_fixtures.cpp
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#include "spec_helper.h"
|
||||
#include "compile.h"
|
||||
#include "../fixtures/grammars/arithmetic.h"
|
||||
#include <fstream>
|
||||
|
||||
START_TEST
|
||||
|
||||
describe("code generation", []() {
|
||||
string test_parser_dir = src_dir() + "/spec/fixtures/parsers";
|
||||
|
||||
it("works for the arithmetic grammar", [&]() {
|
||||
Grammar grammar = test_grammars::arithmetic();
|
||||
ofstream(test_parser_dir + "/arithmetic.c") << compile(grammar);
|
||||
});
|
||||
});
|
||||
|
||||
END_TEST
|
||||
Loading…
Add table
Add a link
Reference in a new issue