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

Lambda linting is broken with version 4.3.2 #340

Open
MikeSchulze opened this issue Oct 25, 2024 · 2 comments
Open

Lambda linting is broken with version 4.3.2 #340

MikeSchulze opened this issue Oct 25, 2024 · 2 comments
Labels
bug Something isn't working parser

Comments

@MikeSchulze
Copy link

MikeSchulze commented Oct 25, 2024

With the new version, the gdlint is broken on lambda code.

It works well with version 4.3.1

extends Node


# Called when the node enters the scene tree for the first time.
func _ready() -> void:

	var reports: = []
	var test_report: int = reports.filter(func (value: int) -> bool:
		return value == 42
		).back()


The gdlint reports now an error:

gdlint addons/tt
addons/tt\test_gdlint.gd:

                ).back()
                ^

Unexpected token Token('RPAR', ')') at line 10, column 3.
Expected one of:
        * CIRCUMFLEX
        * HEX
        * REGULAR_STRING
        * BANG
        * BREAKPOINT
        * DOLLAR
        * PERCENT
        * PLUS
        * VAR
        * AWAIT
        * RETURN
        * CONST
        * LONG_STRING
        * WHILE
        * AMPERSAND
        * LPAR
        * NAME
        * FUNC
        * SET
        * LBRACE
        * GET
        * BIN
        * LONG_RSTRING
        * LSQB
        * CONTINUE
        * REGULAR_RSTRING
        * BREAK
        * IF
        * AT
        * _DEDENT
        * PASS
        * TILDE
        * MATCH
        * NOT
        * FOR
        * MINUS
        * _NL
        * NUMBER
Previous tokens: [Token('_NL', '\n\t\t')]

Failure: 1 problem found

@Scony Scony added the bug Something isn't working label Oct 30, 2024
@Scony
Copy link
Owner

Scony commented Oct 31, 2024

This is most likely a lark bug as in this case, the exception is raised before the right token is being generated.

Anyway, I'm trying to workaround it somehow.

@Scony Scony added the parser label Nov 2, 2024
@Scony
Copy link
Owner

Scony commented Nov 2, 2024

Btw. the workaround in above case is to reduce indentation level of ).back()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parser
Projects
None yet
Development

No branches or pull requests

2 participants