https://github.com/devtony101/miria-code-editor
This an online code editor made for a new programming language named Miria.
https://github.com/devtony101/miria-code-editor
grammars javascript javascript-application language nearley nearleyjs parser spa-application vue vue-project vue-router vuejs vuex
Last synced: 19 days ago
JSON representation
This an online code editor made for a new programming language named Miria.
- Host: GitHub
- URL: https://github.com/devtony101/miria-code-editor
- Owner: DevTony101
- Created: 2020-05-27T19:45:46.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-05-01T12:43:48.000Z (about 1 year ago)
- Last Synced: 2024-05-02T08:15:13.449Z (about 1 year ago)
- Topics: grammars, javascript, javascript-application, language, nearley, nearleyjs, parser, spa-application, vue, vue-project, vue-router, vuejs, vuex
- Language: JavaScript
- Homepage: https://devtony101.github.io/miria-code-editor/
- Size: 1.65 MB
- Stars: 18
- Watchers: 2
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Miria Code Editor
This is a little project that was made to practice the concepts of Vue and the concepts of grammars, especifically, the context free grammars for creating a new programming language called **Miria**. You can give it a try [here](https://devtony101.github.io/miria-code-editor/).## Features

The main view consist of a text area and a div that mimics a console in which the ouput of the code will appear. **Miria** is still a very young language and thus only supports the following:- Declaration and assignment of variables
- If statements
- For, while and do-while statementsThese specs a thoroughly explained in miria documentation [here](https://miria-code-editor.herokuapp.com/docs). The classic *hello world* program in Miria would be as follows:
```
define main as fun() -> void {
log("Hello world")
}
```**Miria** also recognizes errors related to data types, using variables that are not defined and ilegal operations.
## Known bugs
- Miria does not recognize scopes, thus when creating a variable inside any loop, miria will complain arguing that the variable already exist## Future improvements
- Add *break* like statements
- Fix the bug related to scopes
- Add the ability to create arrays
- Add the ability to create functions## Technologies used
- [Nearley](https://nearley.js.org/) was used to generate the parser for miria. The miria.ne file, which contains Miria's grammar, can be found in the *src/grammar/parser directory*
- [Codemirror](https://codemirror.net/) was used as the text editorHuge thanks to @fireship-io for their tutorial on a css-only side navigation bar that ultimately defined the layout of the app.