Skip to content

Line find #9

@JonathanxD

Description

@JonathanxD

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

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