Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several crashes when checking mostly broken files #310

Open
qarmin opened this issue Jul 15, 2024 · 0 comments
Open

Several crashes when checking mostly broken files #310

qarmin opened this issue Jul 15, 2024 · 0 comments

Comments

@qarmin
Copy link

qarmin commented Jul 15, 2024

Code

fn check_file(path: &str) {
    let Ok(data) = fs::read_to_string(path) else {
        return;
    };

    let r = full_moon::parse_fallible(&data, full_moon::LuaVersion::new());
    if r.errors().len() > 0 {
        println!("Error: {:?}", r.errors());
    }
}

crashes

thread 'main' panicked at /home/runner/.cargo/git/checkouts/full-moon-00d3a4faa692bd3d/ef8564e/full-moon/src/ast/parsers.rs:2371:53:
called `Result::unwrap()` on an `Err` value: ()
thread 'main' panicked at /home/runner/.cargo/git/checkouts/full-moon-00d3a4faa692bd3d/ef8564e/full-moon/src/ast/parsers.rs:1701:26:
internal error: entered unreachable code: unexpected interpolated string kind: End
thread 'main' panicked at /home/runner/.cargo/git/checkouts/full-moon-00d3a4faa692bd3d/ef8564e/full-moon/src/ast/parsers.rs:2666:49:
called `Result::unwrap()` on an `Err` value: ()
thread 'main' panicked at /home/runner/.cargo/git/checkouts/full-moon-00d3a4faa692bd3d/ef8564e/full-moon/src/ast/parsers.rs:2646:41:
called `Result::unwrap()` on an `Err` value: ()
thread 'main' panicked at /home/runner/.cargo/git/checkouts/full-moon-00d3a4faa692bd3d/ef8564e/full-moon/src/ast/parsers.rs:2589:41:
called `Result::unwrap()` on an `Err` value: ()
thread 'main' panicked at /home/runner/.cargo/git/checkouts/full-moon-00d3a4faa692bd3d/ef8564e/full-moon/src/ast/parsers.rs:2611:41:
called `Result::unwrap()` on an `Err` value: ()
thread 'main' panicked at /home/runner/.cargo/git/checkouts/full-moon-00d3a4faa692bd3d/ef8564e/full-moon/src/ast/parsers.rs:2568:41:
called `Result::unwrap()` on an `Err` value: ()

REPORTS___FULL_MOON___SHORT_1.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant