Skip to content

bug: Error message says "Semicolons" when newlines cause multiple statements #70

@jonchun

Description

@jonchun

Summary

When multiple statements are separated by newlines (not semicolons), the error message still says "Semicolons are not allowed." The check is on len(file.Stmts) > 1 which catches both separators.

Location

parser/parser.go:54-55

if len(file.Stmts) > 1 {
    return nil, &ParseError{Message: "Semicolons are not allowed. Use && or || for conditional chaining."}
}

Suggested Fix

return nil, &ParseError{Message: "Multiple statements are not allowed. Use && or || for conditional chaining."}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority: lowNice to fix - minor improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions