Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hallerpatrick/live_parser
https://github.com/hallerpatrick/live_parser
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/hallerpatrick/live_parser
- Owner: HallerPatrick
- Created: 2021-08-22T23:18:29.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-18T07:03:12.000Z (almost 2 years ago)
- Last Synced: 2024-12-08T18:04:56.200Z (17 days ago)
- Language: Rust
- Homepage: https://hallerpatrick.github.io/live_parser/liva_parser/
- Size: 3.46 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Liva specs
[![codecov](https://codecov.io/gh/HallerPatrick/live_parser/branch/master/graph/badge.svg?token=B4T9MOAJAT)](https://codecov.io/gh/HallerPatrick/live_parser)This module contains a parser, which is able to parse the liva programming language.
For now this means we generate a intermediate representation, generated with the help of `nom`,
so this is kind of a mix between a lexer and parser.Lua directly emits the opcodes to the VM while parsing. We dont do this cause we like the
decoupling of the parser from the VM. When perfomance become critical/present, this may change.## What to parse
* [x] Comments
* [x] Literals:
* [x] Num
* [x] String
* [x] Bool
* [x] Array
* [x] Map
* [x] Nil
* [x] Variable Names
* [x] Expressions:
* [x] Statements:
* [x] For loop
* [x] While loop
* [x] If(/Else) // TODO: ELSE
* [x] Declarations:
* [x] Classes
* [x] Functions
* [x] Assignment
* [x] Return
* [x] Import
* [x] Keep track of line number and line span
* [ ] Type annotations
* [ ] Annonymus functios?## Crashing snippets
* TODO: Create automated running of the parser for a folder full of source files, they should all running and return a valid and complete liva ast
```Lua
print(":")
pritn("!")
```