Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

panicked at 'internal error: entered unreachable code: unsupported heredoc_dedent argument str' #46

@charlesxsh

Description

@charlesxsh

for given input:
in.zip

with following code:

use lib_ruby_parser::{Parser, ParserOptions};

fn main() {
    let filepath = "<input file>";
    let data = std::fs::read(filepath).unwrap();

        let options = ParserOptions {
            buffer_name: String::from("(eval)"),
            record_tokens: false,
            ..Default::default()
        };
        Parser::new(data, options).do_parse();
}

has output:

thread 'main' panicked at 'internal error: entered unreachable code: unsupported heredoc_dedent argument str', /home/szx5097/.cargo/registry/src/github.com-1ecc6299db9ec823/lib-ruby-parser-3.0.9/src/builder.rs:460:13
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: lib_ruby_parser::builder::Builder::heredoc_dedent
             at /home/szx5097/.cargo/registry/src/github.com-1ecc6299db9ec823/lib-ruby-parser-3.0.9/src/builder.rs:460:13
   3: lib_ruby_parser::parser::parser::Parser::yyaction
             at /home/szx5097/.cargo/registry/src/github.com-1ecc6299db9ec823/lib-ruby-parser-3.0.9/src/parser/parser.rs:9371:43
   4: lib_ruby_parser::parser::parser::Parser::parse
             at /home/szx5097/.cargo/registry/src/github.com-1ecc6299db9ec823/lib-ruby-parser-3.0.9/src/parser/parser.rs:11302:35
   5: lib_ruby_parser::parser::parser::Parser::do_parse
             at /home/szx5097/.cargo/registry/src/github.com-1ecc6299db9ec823/lib-ruby-parser-3.0.9/src/parser/parser.rs:15244:9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions