Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Commit 2eaebb4

Browse files
committed
Merge branch 'feature/sec'
2 parents 11d9baa + 9c96fe9 commit 2eaebb4

File tree

4 files changed

+960
-712
lines changed

4 files changed

+960
-712
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@ See individual `.md`s for detail on the:
1010
* [Code Generator ](./docs/code-generator.md)
1111
* [Code Optimiser ](./docs/optimiser.md)
1212

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+
1328
## Introduction
1429

1530
The scope of this coursework is to implement a compiler for a source language that

index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ const tempFolder = `.\\tmp-${process.pid}\\`
1414
const tempSource = 'compiled.c'
1515
const tempCompiled = 'compiled.exe'
1616

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}`
2018

2119
/* <command> <app> <target file> <debug> */
2220
let filePath: string = (process.argv.length > 1) ? process.argv[2] : null

0 commit comments

Comments
 (0)