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

Parsing error with double inline comments #585

Closed
Stanzilla opened this issue Sep 21, 2022 · 7 comments · Fixed by #586
Closed

Parsing error with double inline comments #585

Stanzilla opened this issue Sep 21, 2022 · 7 comments · Fixed by #586
Labels
bug Something isn't working external This issue relies on an external factor

Comments

@Stanzilla
Copy link

I have this line that StyLua chokes on with error: could not format file ./WeakAuras/Types.lua: error parsing: error occurred while tokenizing: unclosed comment at line 1689, column 5

--["Interface\\PVPFrame\\Icons\\PVP-Banner-Emblem-45"] = "Targeting Eye", -- Duplicate of 53 full file

@JohnnyMorganz
Copy link
Owner

Is this with the latest version? Did it work with 0.14.3? Latest version upgrades the parser which uses a new tokenizer and might have a bug

@Stanzilla
Copy link
Author

Stanzilla commented Sep 21, 2022

I assume it worked with 0.14.3 since it did not error before and I just upgraded to 0.15.0, yeah!

Edit: Yup just tested, was fine on 0.14.3.

@JohnnyMorganz JohnnyMorganz added bug Something isn't working external This issue relies on an external factor labels Sep 21, 2022
@matthargett
Copy link

A few other examples that fail to parse in 0.15, but were fine in 0.14.3:

function stringify(value: any): string
        if _G.__DEV__ then
                return ([=[[%s]]=]):format(Array.join(
                ))
        end
        return ([[{%s}]]):format(Array.join(
                Array.map(entries, function(entry)
                        return ([["%s":%s]]):format(entry[1], entry[2])
                end),
                ","
        ))
end
--[Common IPAs]--

and

--( xyz doesn't abc )

@Kampfkarren
Copy link

Should be moved to full-moon repo

@matthargett
Copy link

Should be moved to full-moon repo

Kampfkarren/full-moon#241

@clason
Copy link

clason commented Sep 22, 2022

Here's another (second line is the one that triggers the warning about the backtick character):

  --`signatures` the value defaults to zero or is ignored if `signatures.length
  --=== 0`. Whenever possible implementors should make an active decision about

@JohnnyMorganz
Copy link
Owner

Looks like there are still some problems with full-moon.
Current recommendation is to temporarily downgrade to 0.14.3. Will try to get this fixed once im free

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

Successfully merging a pull request may close this issue.

5 participants