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

[Bug] Invalid indent of underline in error traceback #434

Closed
3 tasks done
Tracked by #468 ...
Luna-Klatzer opened this issue Feb 27, 2023 · 1 comment
Closed
3 tasks done
Tracked by #468 ...

[Bug] Invalid indent of underline in error traceback #434

Luna-Klatzer opened this issue Feb 27, 2023 · 1 comment
Assignees
Labels
bug Bug or issue in the language or API

Comments

@Luna-Klatzer
Copy link
Member

Is there an existing issue for this?

  • I have searched the existing issues

I am following the documentation's guide

  • I have read the documentation

This issue exists in the latest version

  • I am using the latest version

Current Behavior

When writing a function body and the indention is a single space or a tab character, the compiler will incorrectly create the underline for the error:

For example with a single space:

def x() -> void {
 y();
}

The invalid error is:

[ERROR]: Compilation error - Traceback:
File 'anonymous-script', line 2, col 1:
   y();
  ^    
ReferenceError: Unknown reference 'y'.

Expected Behavior

The underline should point to the correct position of the error.

Steps To Reproduce

  1. Create a function definition with any signature.
  2. Call any undefined function in the body where the indention is a single space or a tab:
    def x() -> void {
      y();
    }
    Alternative:
    def x() -> void {
    	y();
    }

Environment

  • Kipper: 0.10.1
  • Environment: Firefox 109.0b9
  • Operating System: Arch Linux with Linux kernel 5.15.86-1-lts
@Luna-Klatzer Luna-Klatzer added the bug Bug or issue in the language or API label Feb 27, 2023
@Luna-Klatzer Luna-Klatzer self-assigned this Feb 27, 2023
@Luna-Klatzer Luna-Klatzer pinned this issue Feb 27, 2023
@Luna-Klatzer Luna-Klatzer unpinned this issue May 24, 2023
Luna-Klatzer added a commit that referenced this issue Jun 16, 2023
The bug was caused due to an invalid usage of `tokenSrc`, where actually using `srcLine` makes more sense.
Luna-Klatzer added a commit that referenced this issue Jun 16, 2023
The bug was caused due to an invalid usage of `tokenSrc`, where actually using `srcLine` makes more sense.
@Luna-Klatzer
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug or issue in the language or API
Projects
Development

No branches or pull requests

1 participant