Skip to content

C-style comments often cause syntax errors #785

@LJSonik

Description

@LJSonik

Even after enabling C-style comments, most of them are treated as syntax errors, as shown in this screenshot:
image

This is a rather bold assumption, but maybe the parser confuses C-style comments with divisions whenever it expects an expression?

Here is the code from the screenshot, in case you want it:

// GOOD

local var // GOOD
local var2 = 2 // BAD
local var3 = (2 + 1) // BAD
// BAD

print 'string' // BAD
print('string') // BAD

local list = {
    1, // BAD
    2, // GOOD
    3, // GOOD
} // GOOD

local empty = { // BAD
} // GOOD

// GOOD
local function fun(x) // GOOD
    // GOOD
    fun(x) // BAD
    // BAD
    // BAD
end // GOOD

if true then // GOOD
    fun(420) // BAD
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions