Skip to content

Allow expressions in the REPL #70

Description

@ldilley

Feature Description

  • Allow expressions such as 1 + 2 or 1 > 0 in the REPL without an identifier and assignment operator. Currently, in interactive mode, the parser spits the following error rather than evaluate each expression (expected output below should be 3 and true):
> 1 + 2
Parsing error: [1] Expected a statement, got Int
> 1 > 0
Parsing error: [1] Expected a statement, got Int

Perhaps a relaxed mode could be added to cct_new_parser() when using a string lexer (and not file based).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status
ToDo

Relationships

None yet

Development

No branches or pull requests

Issue actions