Skip to content

Commit 7d2e2d2

Browse files
committed
Export pegjs as a string
1 parent 0ee7aa6 commit 7d2e2d2

File tree

3 files changed

+1119
-1
lines changed

3 files changed

+1119
-1
lines changed

src/compiler/__tests__/__utils__/test-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { inspect } from "util";
22
import { Compiler } from "../../compiler";
33
import { BinaryWriter } from "../../binary-writer";
44
import { AST } from "../../../ast/types/packages-and-modules";
5+
import { javaPegGrammar } from "../../grammar"
56
import { execSync } from "child_process";
67

78
import * as peggy from "peggy";
@@ -15,7 +16,6 @@ export type testCase = {
1516

1617
const debug = false;
1718
const pathToTestDir = "./src/compiler/__tests__/";
18-
const javaPegGrammar = fs.readFileSync('./src/compiler/main.pegjs', 'utf-8');
1919
const parser = peggy.generate(javaPegGrammar, {
2020
allowedStartRules: ["CompilationUnit"],
2121
});

0 commit comments

Comments
 (0)