Git Product home page Git Product logo

frontend's Introduction

Orchid compiler frontend

Lines Of Code Badge License: MPL 2.0 GitHub commit activity

This is the compiler frontend for the orchid language.

About

The frontend responsibilities are to:

  1. Tokenize a file
  2. Parse the tokens into an AST
  3. Analyze the AST for errors
  4. Optimize the AST to not recompute constants

Contributing

Contributions are always welcome!

Here is a step-by-step guide on how you can contribute!

  1. Read the CONTRIBUTING file so you know what you want do is actually something that is wanted or possible.
  2. Fork the repo.
  3. Create a new branch. (git checkout -b feature)
  4. Make, commit, and push your changes.
  5. Create a pull request with your changes!

Building

This is a guide to just build the frontend.

Windows

The recommended way is to use Microsoft Visual Studio 2022 (You can probably use any version but that is what it was made with).

From there you can open the project, then use the build in build tools.

The build tools should be in the bar on the top of the screen :)

Linux

To compile the code on linux (or without visual studio) you need to have g++ 13 or later installed.

on debian based systems you can install it like this:

sudo apt update
sudo apt install g++-13

You also need to have cmake installed, this can be done on debian based distros with

sudo apt install cmake

To build the project you can make a directory called out, enter it, then run cmake.

mkdir out
cd out
cmake ..

Then you can build the project to manually test with make.

make frontend

You can build the tests with

make lexer_tests

Then run them with

make test

You can view all the make targets if needed with make help.

License

The orchid compiler frontend is licensed under the Mozilla Public License 2.0 (MPL 2.0).

view the full license

frontend's People

Contributors

riley0122 avatar

Stargazers

 avatar

Watchers

 avatar

frontend's Issues

Add tests

There should be unit tests added to the project.

[REQ] Some error code system

Is your feature request related to a problem? Please describe.
A way to identify errors using an error code.

Describe the solution you'd like
Some error code system.

Describe alternatives you've considered
Logging just the name but that seems a bit arbitrary and make it so that users might ignore it thinking its just some data. If we encode it into an error code we can instantly see what component caused it and where it came from.

[REQ] Custom error class

Is your feature request related to a problem? Please describe.
The std::runtime_error is not ideal.

Describe the solution you'd like
Make a custom error class

Describe alternatives you've considered
tried using std::runtime_error but dont know if i like it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.