mirror of
https://github.com/AdaCore/langkit.git
synced 2026-02-12 12:28:12 -08:00
28 lines
759 B
Python
28 lines
759 B
Python
|
|
def reset():
|
|
"""
|
|
Reset global state in Langkit.
|
|
|
|
TODO: this is a hack to workaround another hack. At some point in the
|
|
future, we should get rid of this global state in Langkit.
|
|
"""
|
|
|
|
import langkit.compile_context
|
|
import langkit.compiled_types
|
|
import langkit.dsl
|
|
import langkit.expressions.base
|
|
import langkit.utils
|
|
|
|
langkit.compiled_types.CompiledTypeRepo.reset()
|
|
langkit.compiled_types.create_builtin_types()
|
|
|
|
langkit.dsl._StructMetaclass.reset()
|
|
langkit.dsl._ASTNodeMetaclass.reset()
|
|
langkit.dsl._EnumMetaclass.reset()
|
|
|
|
langkit.expressions.base.Entity.unfreeze()
|
|
langkit.expressions.base.Self.unfreeze()
|
|
|
|
langkit.utils.reset_memoized()
|
|
langkit.compile_context.compile_ctx = None
|