pythOwO icon indicating copy to clipboard operation
pythOwO copied to clipboard

Undescriptive error messages for lowercase control flow

Open Swiddis opened this issue 2 years ago • 1 comments

Issue description

When writing code which doesn't capitalize the control flow keywords (to below), the error message is very opaque.

Steps to reproduce the issue

Run the following:

pwease sum = 0
FOR i = 0 TO 5 THWEN
    FOR j = 0 to 3 THWEN
        pwease sum = sum + 1
    END
END
pwint(sum)

What's the expected result?

  • If we decide to ignore case on the keywords, then the code should output 15,
  • Or the code should yield an error message that at least points to the right area of the code.

What's the actual result?

  • The code yields
Owo, whats this? Invawid Syntax? Oh nyo! : Token cannot appear after previous tokens
File exwamples/nwest.pyowo, line 2


FOR i = 0 TO 5 THWEN
^^^

Swiddis avatar Jun 30 '22 01:06 Swiddis

Hey, you can tryout this project https://github.com/radon-project/radon because this projects are not maintaining. We will move a language together. It's very exciting. We have implement class feature in our project. Also standard library and third party imports.

See you there.

@Swiddis

Almas-Ali avatar Jun 28 '23 06:06 Almas-Ali