diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 0000000..4cdb9c3
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,5 @@
+blank_issues_enabled: true
+contact_links:
+ - name: Darkmatter X Community
+ url: https://twitter.com/i/communities/1727990925480079392
+ about: Please ask and answer usage-related questions here.
diff --git a/.github/ISSUE_TEMPLATE/issue_bug.md b/.github/ISSUE_TEMPLATE/issue_bug.md
new file mode 100644
index 0000000..3137a9d
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/issue_bug.md
@@ -0,0 +1,29 @@
+---
+name: Bug report
+about: Our code behaves incorrectly?
+title: ''
+labels: bug
+assignees: ''
+
+---
+
+
+
+**Describe the bug**
+
+What happened? What should have happened instead?
+
+**Provide a Reproducer**
+
+* If possible, please provide a small self-contained project (or even just a single file) where the issue reproduces.
+* If you can't pinpoint the issue, please provide at least *some* project where this reproduces, for example, your production one. If you are not ready to show the project publicly, we are open to discussing the details privately.
+* If you really can't provide any code, please do still open an issue. This may prompt other people to chime in with their reproducers.
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..1d564f7
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,67 @@
+name: build
+
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+
+jobs:
+ build:
+ name: "Build: ${{ matrix.config.name }} / ${{ matrix.config.platform }}"
+ runs-on: ${{ matrix.config.os }}
+
+ strategy:
+ fail-fast: true
+ matrix:
+ config:
+ - { name: "Windows Latest", os: windows-latest, platform: x64 }
+ - { name: "Ubuntu Latest", os: ubuntu-latest, platform: x64 }
+ - { name: "macOS 11", os: macos-11, platform: x64 }
+ - { name: "macOS Latest", os: macos-latest, platform: arm64 }
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up OpenJDK 17
+ uses: actions/setup-java@v3
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+
+ - name: Cache Maven dependencies
+ uses: actions/cache@v2
+ with:
+ path: |
+ ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/*.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+
+ - name: Assemble
+ run: mvn install
+
+ unit-test:
+ name: Unit Test
+ runs-on: ubuntu-latest
+ needs: [ build ]
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Set up OpenJDK 17
+ uses: actions/setup-java@v3
+ with:
+ java-version: '17'
+ distribution: 'temurin'
+
+ - name: Cache Maven dependencies
+ uses: actions/cache@v2
+ with:
+ path: |
+ ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/*.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+
+ - name: Run Unit Test
+ run: mvn test
diff --git a/README.md b/README.md
index 6225296..2a17571 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,6 @@
+[![build](https://img.shields.io/github/actions/workflow/status/darkmatter-lang/darkmatter/ci.yml?branch=master)](https://github.com/darkmatter-lang/darkmatter/actions/workflows/ci.yml)
+[![license](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
+
# Darkmatter
A programming language from another universe.
@@ -6,8 +9,6 @@ This is the official darkmatter compiler/linker, it outputs LLVM IR (IL-ASM) and
Darkmatter language adopts a flat-style texture of a blackhole as its official logo and adopts the color `#00FFFF` (cyan) as its "language color."
-
-
I wanted to write a language that was just that, a language.
Some languages these days claim to be "more efficient" by abreviating things,
however, I find that to make the code confusing and messy.
@@ -16,12 +17,9 @@ As even Rust-lang states, most time is spent reading code and refactoring it rat
So the intent with this language is to be readable and easy to understand.
-
-
-
The darkmatter compiler also has a `-I` immediate-interpretation mode which will evaluate the code within the JVM.
-### Roadmap
+## Roadmap
Syntax
- [ ] Unsigned primitives
@@ -57,25 +55,21 @@ Package Manager (`tesseract`)
- [ ] Read `project.toml`
-### Specification
+## Specification
- Directly compiled language, no JIT.
- Can output a static/shared library (.so/.dll/.dylib) or executable (ELF/PE/MACH-O).
- Similar to Java/C# syntax.
- RAII (no Garbage Collector)?
-
-
-#### In the darkmatter language, all variables are:
+### In the darkmatter language, all variables are:
- Statically typed.
- Immutable by default.
+## Logging
-
-### Logging
-
-#### Logging Levels
+### Logging Levels
The default logging levels are as follows:
- `TRACE` Most verbose, all debug messages will be shown including internal process states.
@@ -84,16 +78,51 @@ The default logging levels are as follows:
- `WARN` Only warning messages will be shown along with errors.
- `ERROR` Strictly only error messages will be shown.
-
-#### Console Logging
+### Console Logging
Console logging is always enabled but can be limited to only showing certain messages tagged with specific severities such as `WARN` OR `ERROR`.
This is by-design.
-
-#### File Logging
+### File Logging
File logging can be enabled by either passing in a valid file path as to where logs will be stored, by setting the environment variable `LOG_FILE` to a valid path, or by configuring this via the Java API.
+## Getting Help
+
+Are you having trouble with Darkmatter? We want to help!
+
+- If you are upgrading, read the release notes for upgrade instructions and "new and noteworthy" features.
+
+- Ask a question we monitor stackoverflow.com for questions tagged with darkmatter. You can also talk with the community on X.
+
+- Report bugs with Darkmatter at [https://github.com/darkmatter-lang/darkmatter/issues](https://github.com/darkmatter-lang/darkmatter/issues).
+
+- Join the Discussion on X and be part of the community [https://twitter.com/i/communities/1727990925480079392](https://twitter.com/i/communities/1727990925480079392)
+
+## Reporting Issues
+
+Darkmatter uses GitHub’s integrated issue tracking system to record bugs and feature requests. If you want to raise an issue, please follow the recommendations below:
+
+- Before you log a bug, please search the issue tracker to see if someone has already reported the problem.
+
+- If the issue doesn’t already exist, create a new issue.
+
+- Please provide as much information as possible with the issue report. We like to know the Darkmatter version, operating system etc you’re using.
+
+- If you need to paste code or include a stack trace, use Markdown. ``` escapes before and after your text.
+
+- If possible, try to create a test case or project that replicates the problem and attach it to the issue.
+
+## Contributors
+
+The following contributors have either helped to start this project, have contributed
+code, are actively maintaining it (including documentation), or in other ways
+being awesome contributors to this project. **We'd like to take a moment to recognize them.**
+
+[](https://github.com/anthonywww)
+[](https://github.com/mjovanc)
+
+## License
+The MIT License.
diff --git a/pom.xml b/pom.xml
index 1080d0f..ebb1154 100644
--- a/pom.xml
+++ b/pom.xml
@@ -128,6 +128,13 @@
log4j-core
2.20.0
+
+
+ org.junit.jupiter
+ junit-jupiter-engine
+ 5.10.1
+ test
+
diff --git a/src/test/java/me/anthonyw/darkmatter/ParserTest.java b/src/test/java/me/anthonyw/darkmatter/ParserTest.java
new file mode 100644
index 0000000..2ff07d6
--- /dev/null
+++ b/src/test/java/me/anthonyw/darkmatter/ParserTest.java
@@ -0,0 +1,7 @@
+package me.anthonyw.darkmatter;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+class ParserTest {
+
+}