Skip to content

No handling for ambiguous syntax cases #15

Description

@9382

Per the invitation in the README I've tried to see if I can find any behavioural differences between this and core Lua 5.1, and this was the only thing I picked up. This isn't that important of a case, but the parser does not immediately reject "ambiguous syntax" (function calls that span lines) immediately at the parser level, instead always taking the interpretation that a function call was intended, which is the behaviour of later lua versions (e.g. 5.4), not 5.1
Example code that should flag:

local x = (1) -- either a semicolon or removal of the newline should be required here
(function(y)
	print(x, y)
end)("sup")

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions