Skip to content

Loops throw syntax error when in the REPL #1

@d3dc

Description

@d3dc

When the loop isn't closed on the same line, expect "Unexpected end of input" or "Unexpected }".

Loops are handled by the node repl by waiting for the syntax exception and then "recovering".

Can we do better? Can we eval while in the loop? Since we "compile" the code at runtime, we'll have to parse a bit.

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