-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Disabling the Jinja cache results in the unique name generator state disappearing from the global Jinja context: > return _UniqueNameGenerator.ensure_generator_in_globals(env.globals)('c', adj_base_token, '_', '_') E TypeError: 'NoneType' object is not callable .tox/py35-test/lib/python3.5/site-packages/nunavut/lang/c.py:527: TypeError This issue affects all languages. The following test modification indicates that the state gets replaced with None: ------------------------- src/nunavut/lang/__init__.py ------------------------- index bd6524c..135a29a 100644 @@ -226,7 +226,7 @@ class _UniqueNameGenerator: def ensure_generator_in_globals(cls, environment_globals: typing.Dict[str, typing.Any]) -> '_UniqueNameGenerator': from .. import TypeLocalGlobalKey - if TypeLocalGlobalKey not in environment_globals: + if environment_globals.get(TypeLocalGlobalKey) is None: environment_globals[TypeLocalGlobalKey] = cls() return typing.cast('_UniqueNameGenerator', environment_globals[TypeLocalGlobalKey]) Am stuck. Progress on #91 1) Fixing a problem with unique identifier generation (Issue #88) 2) Generating C++ data structures (Issue #91) Still TODO for Issue #91 is serialization for types.
- Loading branch information
1 parent
5ab9cb7
commit 5c7a66f
Showing
19 changed files
with
666 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,7 @@ | |
"getenv", | ||
"ifdef", | ||
"ifndef", | ||
"inout", | ||
"isfunction", | ||
"isroutine", | ||
"itertools", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.