Skip to content

Parser fires error when find any code after 'break' statement #271

Description

@inklesspen1rus

Darklua can't handle any statements after break

Here's example:

repeat
	break
	print('Unreachable')
until true

That's the error:

--[[
	an error happened while trying to process the code:
unable to process code:
-> unable to parse `file.lua`: error occurred while creating ast: unexpected token `print`. (starting from line 3, character 2 and ending on line 3, character 7)
additional information: expected `until` after block
error occurred while creating ast: unexpected token `until`. (starting from line 4, character 1 and ending on line 4, character 6)
additional information: unexpected token, this needs to be a statement


Configuration: {
  rules: [
  ],
}]]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions