Giter Club home page Giter Club logo

cub's Issues

Lexer

The lever involves some very complicated operations. You have hashing as a token mapper and all these string operations. Since String has variable lengths encoding some of the O(n) operations are secretly O(n^2). I have the same problem in my lexer for Swizzle but I use string indices rather than this so the string only has to scan starting from the current index.

Highlight code ranges in diagnostics

It would be really nice if diagnostics pointed to the code they’re diagnosing, more than just Error on line 2: xxx.

Clang/Swift’s diagnostic formatting is really nice, and I’d love to see something more like that.

foo.cub:10:2 error: unexpected token
   for (), x > 12, x += 1 {
       ^

Bonus points for ANSI coloring.

Simpler way

Can you make a more simpler way of installing the interpreter? Like using brew or something.

No diagnostic raised for failure to return

There’s currently no diagnostic raised when a function declared as returns doesn’t return a value.

This can be tricky, as you have to prove all paths through the function body actually return.

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.