Skip to content
  • Nobuyoshi Nakada's avatar
    127b19ab
    Use line numbers as builtin-index · 127b19ab
    Nobuyoshi Nakada authored
    The order of iseq may differ from the order of tokens, typically
    `while`/`until` conditions are put after the body.
    
    These orders can match by using line numbers as builtin-indexes, but
    at the same time, it introduces the restriction that multiple `cexpr!`
    and `cstmt!` cannot appear in the same line.
    
    Another possible idea is to use `RubyVM::AbstractSyntaxTree` and
    `node_id` instead of ripper, with making BASERUBY 3.1 or later.
    127b19ab
    Use line numbers as builtin-index
    Nobuyoshi Nakada authored
    The order of iseq may differ from the order of tokens, typically
    `while`/`until` conditions are put after the body.
    
    These orders can match by using line numbers as builtin-indexes, but
    at the same time, it introduces the restriction that multiple `cexpr!`
    and `cstmt!` cannot appear in the same line.
    
    Another possible idea is to use `RubyVM::AbstractSyntaxTree` and
    `node_id` instead of ripper, with making BASERUBY 3.1 or later.
Loading