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

Line find #9

Open
JonathanxD opened this issue Feb 18, 2017 · 0 comments
Open

Line find #9

JonathanxD opened this issue Feb 18, 2017 · 0 comments

Comments

@JonathanxD
Copy link
Collaborator

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
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