Skip to content

Add scoping blocks as a new statement type. #418

@PaulBone

Description

@PaulBone

Add scoping blocks so that:

scope {
   var v = ...
   ... use v ..
}
... can't use v ...

But also implement the ability to hide variables within blocks.

var v = ...
scope hiding [v] {
   ... can't use v ...
}
... can use v ...

And the ability to hide everything except some listed variables.

var v = ...
var u = ...
scope [v] {
   // Can use v
   // Can't use u
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions