Skip to content

Line find #9

Description

@jhrldev

CodeAPI-BytecodeWriter provides a way to generate line numbers based on CodeSource index. To help to find out the CodePart that causes the error, we should provide a findLine utility method for CodeSource.

Usage example:

val codeSource = CodeAPI.sourceOfParts(
  a, // 0
  b, // 1
  CodeAPI.sourceOfParts(
    c, // 2
    d // 3
  )
)


CodeSourceUtil.findLine(3, codeSource) // d

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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