-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Init wasm build support * remove null * Add logger that can be customized Update print to fix flushing issue * Use env logger to print parse errors * Remove binary builds * Publish examples in a release * init console module * Improve wasm console support * Update README.md
- Loading branch information
Showing
23 changed files
with
501 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Start with the official TinyGo development image | ||
FROM tinygo/tinygo-dev:latest | ||
|
||
# Install additional development tools | ||
RUN apt-get update && apt-get install -y \ | ||
git \ | ||
make \ | ||
gcc \ | ||
build-essential \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Go tools | ||
RUN go install golang.org/x/tools/cmd/goimports@latest \ | ||
&& go install github.com/go-delve/delve/cmd/dlv@latest | ||
|
||
# Set working directory | ||
WORKDIR /app | ||
|
||
# Add convenient aliases and environment variables | ||
RUN echo 'alias tg="tinygo"' >> ~/.bashrc \ | ||
&& echo 'alias tgb="tinygo build"' >> ~/.bashrc \ | ||
&& echo 'alias tgr="tinygo run"' >> ~/.bashrc | ||
|
||
# Set default command | ||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,58 @@ | ||
# Duwa Programming Language (in progress) | ||
This project is an interpreter for the `duwa` language (Name still getting worked shopped), a language based on the Chewa Bantu language. | ||
This project is written in Golang. | ||
|
||
## Setup and Moni ku dziko | ||
Download the prebuilt binaries for your platform from the [release](https://github.com/sevenreup/duwa/releases) | ||
|
||
Create a new source file, `main.ny` (💀 for now the extension does not matter). | ||
|
||
Paste the following cool code | ||
|
||
```c# | ||
lemba("Moni Dziko"); | ||
``` | ||
Run you new application | ||
This project is an interpreter for the `duwa` language, a language based on the Chewa Bantu language. | ||
This project is written in Golang. | ||
|
||
```bash | ||
duwa -f ./main.ny | ||
``` | ||
## Setup and Zowerenga | ||
|
||
## Zowerenga bwa? | ||
Documentation is on its way, stay on the cutting edge and freestyle your code. | ||
Follow the setup documentations at [official site](https://www.duwa.cphiri.dev) | ||
|
||
You can check out examples in `./examples` folder to quickly see what the language can do for now. | ||
|
||
## Main Milestones | ||
|
||
- [ ] Create an initial interpreter | ||
- [x] Lexer | ||
- [x] Parser (Recursive descent parser) | ||
- [x] Interpreter (Tree walking interpreter) | ||
- [x] Lexer | ||
- [x] Parser (Recursive descent parser) | ||
- [x] Interpreter (Tree walking interpreter) | ||
- [ ] Language features | ||
- [x] Basic data types (string, numbers) | ||
- [x] arithmetic operations | ||
- [x] Control Flow (loops, conditional statements) | ||
- [x] Functions | ||
- [ ] Type checking (for now it does not strictly enforce types) | ||
- [ ] Data Structures | ||
- [x] arrays | ||
- [x] dictionaries | ||
- [ ] Input/ Output | ||
- [ ] Error Handling | ||
- [ ] Class support | ||
- [x] Basic data types (string, numbers) | ||
- [x] arithmetic operations | ||
- [x] Control Flow (loops, conditional statements) | ||
- [x] Functions | ||
- [ ] Type checking (for now it does not strictly enforce types) | ||
- [ ] Data Structures | ||
- [x] arrays | ||
- [x] dictionaries | ||
- [ ] Input/ Output | ||
- [ ] Error Handling | ||
- [ ] Class support | ||
- [ ] Working Wasm version of the language | ||
|
||
Other Milestones | ||
|
||
- [ ] Modularity | ||
- [ ] Standard library | ||
|
||
## Building | ||
|
||
### Prerequisites | ||
|
||
- TinyGo: If you are building the web assembly version you will need `TinyGo`, hers is the [setup](https://tinygo.org/getting-started/install) | ||
- GNU make (optional): Using make for building. You can build the project without `make`. | ||
|
||
### Builing/running | ||
|
||
You can build the project by running any of the build make tasks | ||
|
||
```bash | ||
make build | ||
``` | ||
|
||
Or you can run go build directly | ||
|
||
```bash | ||
go build -C ./src/cmd/duwa -o ../../../bin/duwa | ||
``` | ||
|
||
Running the project is the same either use make or go directly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
version: "3.8" | ||
|
||
services: | ||
tinygo-dev: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
volumes: | ||
- .:/app | ||
- go-cache:/home/dev/go | ||
- go-mod-cache:/go/pkg/mod | ||
environment: | ||
- GOPATH=/go | ||
- GOCACHE=/home/dev/go | ||
- GOMODCACHE=/go/pkg/mod | ||
ports: | ||
- "2345:2345" # for delve debugger | ||
tty: true | ||
stdin_open: true | ||
|
||
volumes: | ||
go-cache: | ||
go-mod-cache: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module github.com/sevenreup/duwa | ||
|
||
go 1.22.0 | ||
go 1.23.0 | ||
|
||
require github.com/shopspring/decimal v1.3.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.