Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Output AST generated a syntax error #873

Open
pedrohgmacedo opened this issue Jul 8, 2024 · 1 comment
Open

Output AST generated a syntax error #873

pedrohgmacedo opened this issue Jul 8, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@pedrohgmacedo
Copy link

I get this error:

[ERROR] Formatter 'stylua' error: error: could not format from stdin: failed to format from stdin: INTERNAL ERROR: Output AST generated a syntax error. Please report this at https://github.com/johnnymorganz/stylua/issues
  error occurred while creating ast: unexpected token `console`

When attempting to format this example file from the IUP gui library.

@JohnnyMorganz
Copy link
Owner

Thanks for reporting! Looks like the problematic part are the comments in this section:

console.dialog = iup.dialog
{
  iup.vbox
  {
    iup.frame
    {
      iup.hbox -- use it to inherit margins
      {
        console.prompt,
      },
      title = "Command:",
    },
    iup.frame
    {
      iup.hbox -- use it to inherit margins
      {
        console.output
      },
      title = "Output:",
    },
    margin = "5x5",
    gap = "5",
  },
  title="Lua Console",
  size="250x180", -- initial size
  icon=0, -- use the Lua icon from the executable in Windows
}

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

No branches or pull requests

2 participants