This repository was archived by the owner on Oct 20, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +960
-712
lines changed Expand file tree Collapse file tree 4 files changed +960
-712
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,21 @@ See individual `.md`s for detail on the:
10
10
* [ Code Generator ] ( ./docs/code-generator.md )
11
11
* [ Code Optimiser ] ( ./docs/optimiser.md )
12
12
13
+ ## Usage
14
+
15
+ Install dependencies:
16
+
17
+ * ` npm i `
18
+ * A form of g++ in ENV (e.g. MinGW)
19
+
20
+ For hello world:
21
+
22
+ ` npm start .\test\scripts\hello-world.ts `
23
+
24
+ Or, in general:
25
+
26
+ ` npm start <script> `
27
+
13
28
## Introduction
14
29
15
30
The scope of this coursework is to implement a compiler for a source language that
Original file line number Diff line number Diff line change @@ -14,9 +14,7 @@ const tempFolder = `.\\tmp-${process.pid}\\`
14
14
const tempSource = 'compiled.c'
15
15
const tempCompiled = 'compiled.exe'
16
16
17
- const gccDir = 'C:\\MinGW\\bin\\'
18
- const gcc = 'g++.exe'
19
- const compile = `${ gccDir } ${ gcc } ${ tempFolder } ${ tempSource } -o ${ tempFolder } ${ tempCompiled } `
17
+ const compile = `g++ ${ tempFolder } ${ tempSource } -o ${ tempFolder } ${ tempCompiled } `
20
18
21
19
/* <command> <app> <target file> <debug> */
22
20
let filePath : string = ( process . argv . length > 1 ) ? process . argv [ 2 ] : null
You can’t perform that action at this time.
0 commit comments