mirror of
https://github.com/catseye/SixtyPical.git
synced 2025-02-19 20:30:45 +00:00
Fix links in README. Implement Context.clone().
This commit is contained in:
parent
dd4c50fc50
commit
9c201ccf07
@ -22,11 +22,9 @@ Documentation
|
|||||||
-------------
|
-------------
|
||||||
|
|
||||||
* Design Goals — coming soon.
|
* Design Goals — coming soon.
|
||||||
* [doc/SixtyPical.md](SixtyPical.md) — the spec
|
* [SixtyPical specification](doc/SixtyPical.md)
|
||||||
* [tests/SixtyPical Execution.md](SixtyPical Execution.md) —
|
* [Literate test suite for SixtyPical execution](tests/SixtyPical Execution.md)
|
||||||
literate test suite for running SixtyPical programs
|
* [Literate test suite for SixtyPical analysis](tests/SixtyPical Analysis.md)
|
||||||
* [tests/SixtyPical Analysis.md](SixtyPical Analysis.md) —
|
|
||||||
literate test suite for statically analyzing SixtyPical programs
|
|
||||||
|
|
||||||
TODO
|
TODO
|
||||||
----
|
----
|
||||||
|
@ -48,6 +48,12 @@ class Context():
|
|||||||
self._store.setdefault(ref.name, UNINITIALIZED)
|
self._store.setdefault(ref.name, UNINITIALIZED)
|
||||||
self._writeables.add(ref.name)
|
self._writeables.add(ref.name)
|
||||||
|
|
||||||
|
def clone(self):
|
||||||
|
c = Context([], [], [])
|
||||||
|
c._store = dict(self._store)
|
||||||
|
c._writeables = set(self._writeables)
|
||||||
|
return c
|
||||||
|
|
||||||
def assertInitialized(self, *refs, **kwargs):
|
def assertInitialized(self, *refs, **kwargs):
|
||||||
exception_class = kwargs.get('exception_class', UninitializedAccessError)
|
exception_class = kwargs.get('exception_class', UninitializedAccessError)
|
||||||
for ref in refs:
|
for ref in refs:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user