Skip to content

Commit 8139b9e

Browse files
ChampiiFlorian Greiner
and
Florian Greiner
authored
v0.1.7 (#51)
* Version bump * Generated files for new version * Add complete TypeSignature parsing (#30) * Generated files for new version * Fix branch name that is invalid cargo version * Fix readme build status * Unified version name in readme and cargo.toml * Merged TypeSignature with FuncType * Deactivated out of bounds error for literal index * Removed some clones * Clippy free * Add forgotten file * Generated files for new version * Readme * Generated files for new version * Remove old artefacts * Fix fn arg polymorphism * Add some typecheck failure tests * Add multiline struct const * Add struct field type failure * Generated files for new version Co-authored-by: Florian Greiner <[email protected]> * Generated files for new version * Merge * Merge * Mostly cleanup (#40) * Cleanup of type from implementation * Separated struct type into its own module * Separated Types into their own module * Better FuncType implementation * Clippy * Factorized some code in ty::Type * More sensible module and macro exports * Separated resolver from ast * Cleanup, import and code concision * Exchanged concat_idents for paste macro in trait generation * Generated files for new version Co-authored-by: Florian Greiner <[email protected]> * Generated files for new version * Added LLVM12 requirement in README * Generated files for new version * Clang instead of llc (#45) * Removed llc to keep only clang as a build dependency * Generated files for new version Co-authored-by: Florian Greiner <[email protected]> * Generated files for new version * Create LICENSE * Optimisation pass (#48) * Add (too many) LLVM pass optimizations * Generated files for new version * Interpreter (#49) * Add basic interpreter and fix reassign resolve * Add some better colors for everything * Fix cargo warnings * Color fix and REPL section in README * Readme * First work on repl toplevel decl * Generated files for new version * Top level decl * Colors * Fix cargo * Generated files for new version * Cleanup Co-authored-by: Florian Greiner <[email protected]> * Generated files for new version Co-authored-by: Florian Greiner <[email protected]>
1 parent 5a5db0f commit 8139b9e

29 files changed

+1554
-191
lines changed

.github/templates/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ regex = "1"
1111
env_logger = "0.5.12"
1212
log = "0.4"
1313
bitflags = "1.2.1"
14-
concat-idents = "1.1.2"
1514
# inkwell = { git = "https://github.com/TheDan64/inkwell", branch = "master", features = ["llvm11-0"] }
1615
inkwell = { version = "0.1.0-beta.3", features = ["llvm12-0"] }
1716
either = "1.5"
@@ -20,6 +19,7 @@ serde_derive = '*'
2019
bincode = "*"
2120
colored = "2.0.0"
2221
paste = "1.0.5"
22+
rustyline = "9.0.0"
2323

2424
[lib]
2525
name = "rock"

.github/templates/README.md

+45-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ It's highly inspired from Livescript, and will borrow (pun intended) some featur
1313
- [With cargo from Git]( #with-cargo-from-git )
1414
- [From sources]( #from-sources )
1515
- [Quickstart]( #quickstart )
16+
- [Basic setup]( #basic-setup )
17+
- [REPL]( #repl )
1618
- [Showcases]( #showcases )
1719
- [Development notes]( #development-notes )
1820

@@ -24,6 +26,7 @@ It's highly inspired from Livescript, and will borrow (pun intended) some featur
2426
- Typeclass (Traits)
2527
- Parametric Polymorphism by default
2628
- Compile to LLVM IR
29+
- REPL (ALPHA)
2730

2831
## Install
2932

@@ -33,6 +36,8 @@ How to install and run the compiler:
3336

3437
### Using released binary
3538

39+
You will need `clang` somewhere in your $PATH
40+
3641
Linux x86_64 only
3742

3843
[Rock {version}](https://github.com/Champii/Rock/releases/download/{version}/rock) (Tested on arch, btw)
@@ -43,14 +48,18 @@ chmod +x rock
4348
./rock -V
4449
```
4550

46-
### With cargo from git
51+
### From source
52+
53+
You will need `llvm-12.0.1` and `clang-12.0.1` somewhere in your $PATH
54+
55+
#### With cargo from git
4756

4857
``` sh
4958
cargo install --git https://github.com/Champii/Rock
5059
rock -V
5160
```
5261

53-
### From sources
62+
#### Manual clone and build from git
5463

5564
``` sh
5665
git clone https://github.com/Champii/Rock.git
@@ -60,6 +69,8 @@ cargo run -- -V
6069

6170
## Quickstart
6271

72+
### Basic setup
73+
6374
Lets create a new project folder to compute some factorials
6475

6576
``` sh
@@ -97,6 +108,38 @@ Should output
97108
24
98109
```
99110

111+
Take a look at `rock --help` for a quick tour of its flags and arguments
112+
113+
### REPL
114+
115+
You can start a REPL session with
116+
117+
``` sh
118+
rock -r
119+
# OR
120+
rock --repl
121+
```
122+
123+
``` sh
124+
Rock: {version}
125+
----
126+
127+
Type ':?' for help
128+
129+
> add a b = a + b
130+
> let x = 30
131+
30
132+
> let y = 12
133+
12
134+
> add x, y
135+
42
136+
> :t add
137+
add: (Int64 -> Int64 -> Int64)
138+
> _
139+
```
140+
141+
Only supports basic expressions for now.
142+
100143
## Showcases
101144

102145
### Polymophic function

.github/version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.1.6
1+
v0.1.7

0 commit comments

Comments
 (0)