Skip to content

Parser reporting wrong kind of error #60

@SlothScript

Description

@SlothScript

Suppose you have this code:

fn main() {
    let a = 3;
    println(a);
}

This prints "3" as expected. Now use this code:

fn func() {
    return 3;
}

fn main() {
    let a = func();
    println(a);
}

Expected behavior

This code should also print 3, but instead it says:

AST Error[0x300002]: Expected a semicolon at the end of the line
     ┌─ ./src/main.rt:6:186 │     return 3;     
     │                  ^ Insert semicolon (;)```

Metadata

Metadata

Assignees

Labels

astAST parser stuffhotfixSomething that is going to be PR'd directly to master.🐞 bugSomething isn't working

Type

Projects

Status

To Do

Relationships

None yet

Development

No branches or pull requests

Issue actions