Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crutchcorn/the-lovely-language
💖 An experimental homegrown coding language.
https://github.com/crutchcorn/the-lovely-language
coding-language compiler home-grown language lexer parser
Last synced: 15 days ago
JSON representation
💖 An experimental homegrown coding language.
- Host: GitHub
- URL: https://github.com/crutchcorn/the-lovely-language
- Owner: crutchcorn
- License: mit
- Created: 2023-07-20T04:37:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-20T06:40:33.000Z (over 1 year ago)
- Last Synced: 2024-12-25T13:14:46.340Z (17 days ago)
- Topics: coding-language, compiler, home-grown, language, lexer, parser
- Language: TypeScript
- Homepage:
- Size: 65.4 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[![Build Status](https://img.shields.io/github/actions/workflow/status/crutchcorn/the-lovely-language/build.yml?branch=main)](https://github.com/crutchcorn/the-lovely-language/actions/workflows/build.yml?query=branch%3Amain)
[![Test Status](https://img.shields.io/github/actions/workflow/status/crutchcorn/the-lovely-language/test.yml?branch=main&label=tests)](https://github.com/crutchcorn/the-lovely-language/actions/workflows/test.yml?query=branch%3Amain)
[![license](https://badgen.now.sh/badge/license/MIT)](./LICENSE.md)The goals of this project are:
- Fully homegrown
- No dependencies
- Start with lexer and parser
- No runtime or compiler (yet)
- Static typings
- No runtime or build-time type checking (yet)## Syntax
```shell
infer Test = 0 + 1 + 2;
infer Other = 0;
```Outputs the following AST:
```json
{
"type": "Program",
"body": [
{
"type": "InferStatement",
"identifier": {
"type": "Identifier",
"val": "Test"
},
"value": {
"type": "AddStatement",
"left": {
"type": "Number",
"val": "0"
},
"right": {
"type": "AddStatement",
"left": {
"type": "Number",
"val": "1"
},
"right": {
"type": "Number",
"val": "2"
}
}
}
},
{
"type": "InferStatement",
"identifier": {
"type": "Identifier",
"val": "Test"
},
"value": {
"type": "Number",
"val": "0"
}
}
]
}
```> This project is currently held together by ducktape and string. I've never built a lexer, parser, or compiler before.
>
> I'm learning as I go. I'm sure there are many things I'm doing wrong. I'm open to feedback.
>
> I'm also intentionally taking the slow route at times and not referencing existing implementation or documentation at this time.