Skip to content

Support statements and expressions in the same cell #3

@sbliven

Description

@sbliven

Currently a cell can either contain statements or a single expression. At a minimum this should be relaxed to allow some statements followed by an expression.

a = 1;
a
int nonvoidFunction() {return 0;}
nonvoidFunction()

Better would be to loosen the distinction between statements and expressions so that they can be used interchangably. This would make semicolon use more predictable (eg no need to distinguish void function calls (statements) from non-void calls (expressions)).

nonvoidFunction();
a = [4];
void voidFuntion() {}
voidFunction()

For a final twist, I can't figure out how use statements fit in (they require semicolons but are one-per-cell like expressions), but they should be harmonized as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions