Fixing some small things. And making some design decisions.

This commit is contained in:
K35 2021-12-31 21:42:24 +00:00
parent d5cfdcadc1
commit cc6035eef0
4 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
import "./import.binc"; import "./import";
enum TestEnum { enum TestEnum {
VAL1, VAL1,

View File

@ -1,12 +1,12 @@
{ {
"name": "@hibas123/SimpleRPC", "name": "@hibas123/jrpcgen",
"version": "1.0.0", "version": "1.0.0",
"main": "lib/index.js", "main": "lib/index.js",
"license": "MIT", "license": "MIT",
"packageManager": "yarn@3.1.1", "packageManager": "yarn@3.1.1",
"scripts": { "scripts": {
"start": "ts-node src/index.ts", "start": "ts-node src/index.ts",
"test": "npm run start -- compile examples/example.binc -o=ts-node:examples/out && ts-node examples/test.ts" "test": "npm run start -- compile examples/example.jrpc -o=ts-node:examples/out && ts-node examples/test.ts"
}, },
"devDependencies": { "devDependencies": {
"@types/debug": "^4.1.7", "@types/debug": "^4.1.7",

View File

@ -96,7 +96,7 @@ function processFile(ctx: ProcessContext, file: string): Parsed | null {
.map((statement) => { .map((statement) => {
if (statement.type == "import") { if (statement.type == "import") {
const base = Path.dirname(file); const base = Path.dirname(file);
const resolved = Path.resolve(Path.join(base, statement.path)); const resolved = Path.resolve(Path.join(base, statement.path + ".jrpc"));
return processFile(ctx, resolved); return processFile(ctx, resolved);
} else { } else {
return statement; return statement;