Code Monkey home page Code Monkey logo

nums's People

Contributors

jacoobes avatar

Watchers

 avatar

nums's Issues

Codespan inaccurately reports location of error

Currently having issues that track the location of the error while parsing.
For example,

package a //packages are supposed to end in semicolons

     fun foo| a: str| {}

Error :

Expected Semi, got Function
src/main.nums:5:7

     fun foo|a:str| {}
        ^

The error reporting is nowhere near accurate

Blocks

blocks can act as an expression also, returning an expression at the end. It'ss sorta like an iife from js

Error handling

Implement better error handling for the first stage of parsing.

Error handling pt2

Need a way for Nums to track the file that's currently being parsed/ compiled so it contributes to a cleaner error handling. I already have lines and the basic location of where the error is. Need file location.

Unit tests assertions

I was lazy and only printed out ASTs instead of asserting they were correct. Need some help making assert statements to unit test the AST nodes correctly.

 fn power() {
        let text = "5 ^ 10 + 16 + 3;";
        let tree= create_tree(text);
        match tree {
            Ok(e) => println!("{:?}", &e),
            Err(span) => println!("{:?}", span)
        }
    }

For example, I'm just printing out instead of asserting.

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.