syncraft 0.1.8__tar.gz → 0.1.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of syncraft might be problematic. Click here for more details.
- {syncraft-0.1.8 → syncraft-0.1.9}/PKG-INFO +1 -1
- {syncraft-0.1.8 → syncraft-0.1.9}/pyproject.toml +1 -1
- {syncraft-0.1.8 → syncraft-0.1.9}/syncraft/generator.py +5 -5
- {syncraft-0.1.8 → syncraft-0.1.9}/syncraft.egg-info/PKG-INFO +1 -1
- {syncraft-0.1.8 → syncraft-0.1.9}/LICENSE +0 -0
- {syncraft-0.1.8 → syncraft-0.1.9}/README.md +0 -0
- {syncraft-0.1.8 → syncraft-0.1.9}/setup.cfg +0 -0
- {syncraft-0.1.8 → syncraft-0.1.9}/syncraft/__init__.py +0 -0
- {syncraft-0.1.8 → syncraft-0.1.9}/syncraft/algebra.py +0 -0
- {syncraft-0.1.8 → syncraft-0.1.9}/syncraft/cmd.py +0 -0
- {syncraft-0.1.8 → syncraft-0.1.9}/syncraft/diagnostic.py +0 -0
- {syncraft-0.1.8 → syncraft-0.1.9}/syncraft/dsl.py +0 -0
- {syncraft-0.1.8 → syncraft-0.1.9}/syncraft/parser.py +0 -0
- {syncraft-0.1.8 → syncraft-0.1.9}/syncraft/py.typed +0 -0
- {syncraft-0.1.8 → syncraft-0.1.9}/syncraft/sqlite3.py +0 -0
- {syncraft-0.1.8 → syncraft-0.1.9}/syncraft.egg-info/SOURCES.txt +0 -0
- {syncraft-0.1.8 → syncraft-0.1.9}/syncraft.egg-info/dependency_links.txt +0 -0
- {syncraft-0.1.8 → syncraft-0.1.9}/syncraft.egg-info/requires.txt +0 -0
- {syncraft-0.1.8 → syncraft-0.1.9}/syncraft.egg-info/top_level.txt +0 -0
|
@@ -123,16 +123,16 @@ class GenState(Generic[T], Insptectable):
|
|
|
123
123
|
def freeform(self) -> GenState[T]:
|
|
124
124
|
return FreeformState(ast=None, seed=self.seed)
|
|
125
125
|
|
|
126
|
+
|
|
126
127
|
@classmethod
|
|
127
128
|
def from_ast(cls, ast: Optional[AST[T]], seed: int = 0) -> GenState[T]:
|
|
128
|
-
|
|
129
|
+
ret = cls(ast=ast, seed=seed)
|
|
130
|
+
return ret if ast is not None else ret.freeform()
|
|
131
|
+
|
|
129
132
|
|
|
130
133
|
@classmethod
|
|
131
134
|
def from_parse_result(cls, parse_result: Optional[ParseResult[T]], seed: int = 0) -> GenState[T]:
|
|
132
|
-
|
|
133
|
-
return ret if parse_result is not None else ret.freeform()
|
|
134
|
-
|
|
135
|
-
|
|
135
|
+
return cls.from_ast(AST(parse_result) if parse_result else None, seed)
|
|
136
136
|
|
|
137
137
|
|
|
138
138
|
@dataclass(frozen=True)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|