Skip to content

Commit

Permalink
v0.1.7 (#51)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
Champii and Florian Greiner authored Oct 4, 2021
1 parent 5a5db0f commit 8139b9e
Show file tree
Hide file tree
Showing 29 changed files with 1,554 additions and 191 deletions.
2 changes: 1 addition & 1 deletion .github/templates/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ regex = "1"
env_logger = "0.5.12"
log = "0.4"
bitflags = "1.2.1"
concat-idents = "1.1.2"
# inkwell = { git = "https://github.com/TheDan64/inkwell", branch = "master", features = ["llvm11-0"] }
inkwell = { version = "0.1.0-beta.3", features = ["llvm12-0"] }
either = "1.5"
Expand All @@ -20,6 +19,7 @@ serde_derive = '*'
bincode = "*"
colored = "2.0.0"
paste = "1.0.5"
rustyline = "9.0.0"

[lib]
name = "rock"
Expand Down
47 changes: 45 additions & 2 deletions .github/templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ It's highly inspired from Livescript, and will borrow (pun intended) some featur
- [With cargo from Git]( #with-cargo-from-git )
- [From sources]( #from-sources )
- [Quickstart]( #quickstart )
- [Basic setup]( #basic-setup )
- [REPL]( #repl )
- [Showcases]( #showcases )
- [Development notes]( #development-notes )

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

## Install

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

### Using released binary

You will need `clang` somewhere in your $PATH

Linux x86_64 only

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

### With cargo from git
### From source

You will need `llvm-12.0.1` and `clang-12.0.1` somewhere in your $PATH

#### With cargo from git

``` sh
cargo install --git https://github.com/Champii/Rock
rock -V
```

### From sources
#### Manual clone and build from git

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

## Quickstart

### Basic setup

Lets create a new project folder to compute some factorials

``` sh
Expand Down Expand Up @@ -97,6 +108,38 @@ Should output
24
```

Take a look at `rock --help` for a quick tour of its flags and arguments

### REPL

You can start a REPL session with

``` sh
rock -r
# OR
rock --repl
```

``` sh
Rock: {version}
----

Type ':?' for help

> add a b = a + b
> let x = 30
30
> let y = 12
12
> add x, y
42
> :t add
add: (Int64 -> Int64 -> Int64)
> _
```

Only supports basic expressions for now.

## Showcases

### Polymophic function
Expand Down
2 changes: 1 addition & 1 deletion .github/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.1.6
v0.1.7
Loading

0 comments on commit 8139b9e

Please sign in to comment.