Code Monkey home page Code Monkey logo

yak's People

Contributors

surrealegg avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

yak's Issues

Implement mini Jakt

  • Error Reporting
  • Lexer
    • Types i8 u8 i16 u16 i32 u32 i64 u64 f32 f64 bool c_int c_char usize void
    • Keywords function extern let mut if else while loop return not and or true false raw anon as
    • Symbols { } [ ] ( ) + - * / = == != > >= < <= >> << += -= *= /= >>= <<=
    • Literals
      • Chars
      • Strings
      • Integers
      • Floats
  • Parser
    • Expression
      • Literal
      • Binary
      • Unary
      • Grouping
      • Assignment
      • Variable Declaration
      • Call
      • Cast
    • Statement
      • Block
      • While
      • Loop
      • If Else
      • Prototype
        • Parameter
      • Function
        • Return
  • Type checker
    • Binary
    • Call
    • Assignment
  • Codegen

Todo list is currently in the works

Typechecker: Typechecker ignores return statements inside blocks

extern function printf(anon format: raw c_char, anon number: i64) -> usize

function fibonacci(anon n: i64) -> i64 {
    if n <= 1 {
        return (n);
    } else {
        return (fibonacci(n - 1) + fibonacci(n - 2));
    }
}

function main() {
    printf("%d\n", fibonacci(12));
}
error: mismatched types. expected 'i64', but got 'void'
----- samples/fibonacci.jakt:3:0
   2| 
   3| function fibonacci(anon n: i64) -> i64 {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   4|     if n <= 1 {
-----

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.