syncraft 0.1.17__tar.gz → 0.1.18__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.

Files changed (23) hide show
  1. {syncraft-0.1.17 → syncraft-0.1.18}/PKG-INFO +1 -1
  2. {syncraft-0.1.17 → syncraft-0.1.18}/pyproject.toml +1 -1
  3. {syncraft-0.1.17 → syncraft-0.1.18}/syncraft.egg-info/PKG-INFO +1 -1
  4. {syncraft-0.1.17 → syncraft-0.1.18}/tests/test_bimap.py +12 -0
  5. {syncraft-0.1.17 → syncraft-0.1.18}/LICENSE +0 -0
  6. {syncraft-0.1.17 → syncraft-0.1.18}/README.md +0 -0
  7. {syncraft-0.1.17 → syncraft-0.1.18}/setup.cfg +0 -0
  8. {syncraft-0.1.17 → syncraft-0.1.18}/syncraft/__init__.py +0 -0
  9. {syncraft-0.1.17 → syncraft-0.1.18}/syncraft/algebra.py +0 -0
  10. {syncraft-0.1.17 → syncraft-0.1.18}/syncraft/ast.py +0 -0
  11. {syncraft-0.1.17 → syncraft-0.1.18}/syncraft/cmd.py +0 -0
  12. {syncraft-0.1.17 → syncraft-0.1.18}/syncraft/diagnostic.py +0 -0
  13. {syncraft-0.1.17 → syncraft-0.1.18}/syncraft/dsl.py +0 -0
  14. {syncraft-0.1.17 → syncraft-0.1.18}/syncraft/generator.py +0 -0
  15. {syncraft-0.1.17 → syncraft-0.1.18}/syncraft/parser.py +0 -0
  16. {syncraft-0.1.17 → syncraft-0.1.18}/syncraft/py.typed +0 -0
  17. {syncraft-0.1.17 → syncraft-0.1.18}/syncraft/sqlite3.py +0 -0
  18. {syncraft-0.1.17 → syncraft-0.1.18}/syncraft.egg-info/SOURCES.txt +0 -0
  19. {syncraft-0.1.17 → syncraft-0.1.18}/syncraft.egg-info/dependency_links.txt +0 -0
  20. {syncraft-0.1.17 → syncraft-0.1.18}/syncraft.egg-info/requires.txt +0 -0
  21. {syncraft-0.1.17 → syncraft-0.1.18}/syncraft.egg-info/top_level.txt +0 -0
  22. {syncraft-0.1.17 → syncraft-0.1.18}/tests/test_parse.py +0 -0
  23. {syncraft-0.1.17 → syncraft-0.1.18}/tests/test_until.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: syncraft
3
- Version: 0.1.17
3
+ Version: 0.1.18
4
4
  Summary: Parser combinator library
5
5
  Author-email: Michael Afmokt <michael@esacca.com>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "syncraft"
3
- version = "0.1.17"
3
+ version = "0.1.18"
4
4
  description = "Parser combinator library"
5
5
  license = "MIT"
6
6
  license-files = ["LICENSE"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: syncraft
3
- Version: 0.1.17
3
+ Version: 0.1.18
4
4
  Summary: Parser combinator library
5
5
  Author-email: Michael Afmokt <michael@esacca.com>
6
6
  License-Expression: MIT
@@ -259,3 +259,15 @@ def test_combo() -> None:
259
259
  ast = parse(syntax(Parser), sql, dialect="sqlite")
260
260
  assert isinstance(ast, Error)
261
261
 
262
+
263
+ def test_optional():
264
+ A = literal("a").bind("a")
265
+ syntax = A.optional()
266
+ ast1 = parse(syntax(Parser), "", dialect="sqlite")
267
+ v1, _ = ast1.bimap(None)
268
+ assert v1 is None
269
+ ast2 = parse(syntax(Parser), "a", dialect="sqlite")
270
+ v2, _ = ast2.bimap(None)
271
+ assert v2 == NamedResult(name='a', value=TokenGen.from_string('a'))
272
+
273
+
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