cxxheaderparser 1.3.1__tar.gz → 1.3.2__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.
Files changed (50) hide show
  1. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/PKG-INFO +1 -1
  2. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser/parser.py +3 -1
  3. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser/version.py +1 -1
  4. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser.egg-info/PKG-INFO +1 -1
  5. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_using.py +61 -0
  6. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/LICENSE.txt +0 -0
  7. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/README.md +0 -0
  8. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser/__init__.py +0 -0
  9. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser/__main__.py +0 -0
  10. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser/_ply/__init__.py +0 -0
  11. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser/_ply/lex.py +0 -0
  12. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser/dump.py +0 -0
  13. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser/errors.py +0 -0
  14. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser/gentest.py +0 -0
  15. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser/lexer.py +0 -0
  16. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser/options.py +0 -0
  17. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser/parserstate.py +0 -0
  18. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser/preprocessor.py +0 -0
  19. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser/py.typed +0 -0
  20. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser/simple.py +0 -0
  21. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser/tokfmt.py +0 -0
  22. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser/types.py +0 -0
  23. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser/visitor.py +0 -0
  24. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser.egg-info/SOURCES.txt +0 -0
  25. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser.egg-info/dependency_links.txt +0 -0
  26. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser.egg-info/requires.txt +0 -0
  27. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/cxxheaderparser.egg-info/top_level.txt +0 -0
  28. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/setup.cfg +0 -0
  29. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/setup.py +0 -0
  30. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_abv_template.py +0 -0
  31. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_attributes.py +0 -0
  32. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_class.py +0 -0
  33. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_class_base.py +0 -0
  34. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_concepts.py +0 -0
  35. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_doxygen.py +0 -0
  36. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_enum.py +0 -0
  37. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_fn.py +0 -0
  38. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_friends.py +0 -0
  39. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_misc.py +0 -0
  40. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_namespaces.py +0 -0
  41. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_numeric_literals.py +0 -0
  42. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_operators.py +0 -0
  43. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_preprocessor.py +0 -0
  44. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_skip.py +0 -0
  45. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_template.py +0 -0
  46. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_tokfmt.py +0 -0
  47. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_typedef.py +0 -0
  48. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_typefmt.py +0 -0
  49. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_union.py +0 -0
  50. {cxxheaderparser-1.3.1 → cxxheaderparser-1.3.2}/tests/test_var.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cxxheaderparser
3
- Version: 1.3.1
3
+ Version: 1.3.2
4
4
  Summary: Parse C++ header files and generate a data structure representing the class
5
5
  Home-page: https://github.com/robotpy/cxxheaderparser
6
6
  Author: Dustin Spicuzza
@@ -1041,7 +1041,9 @@ class CxxParser:
1041
1041
  ) -> None:
1042
1042
  self.state.location = tok.location
1043
1043
 
1044
- tok = self._next_token_must_be("NAME", "DBL_COLON", "namespace", "typename")
1044
+ tok = self._next_token_must_be(
1045
+ "NAME", "DBL_COLON", "namespace", "typename", "enum"
1046
+ )
1045
1047
 
1046
1048
  if tok.type == "namespace":
1047
1049
  if template:
@@ -1,2 +1,2 @@
1
1
  # Autogenerated by setup.py
2
- __version__ = '1.3.1'
2
+ __version__ = '1.3.2'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cxxheaderparser
3
- Version: 1.3.1
3
+ Version: 1.3.2
4
4
  Summary: Parse C++ header files and generate a data structure representing the class
5
5
  Home-page: https://github.com/robotpy/cxxheaderparser
6
6
  Author: Dustin Spicuzza
@@ -716,3 +716,64 @@ def test_using_typename_in_class() -> None:
716
716
  ]
717
717
  )
718
718
  )
719
+
720
+
721
+ def test_using_enum_global() -> None:
722
+ content = """
723
+ namespace A {
724
+ using enum B::C;
725
+ }
726
+ """
727
+ data = parse_string(content, cleandoc=True)
728
+
729
+ assert data == ParsedData(
730
+ namespace=NamespaceScope(
731
+ namespaces={
732
+ "A": NamespaceScope(
733
+ name="A",
734
+ using=[
735
+ UsingDecl(
736
+ typename=PQName(
737
+ segments=[
738
+ NameSpecifier(name="B"),
739
+ NameSpecifier(name="C"),
740
+ ],
741
+ classkey="enum",
742
+ )
743
+ )
744
+ ],
745
+ )
746
+ }
747
+ )
748
+ )
749
+
750
+
751
+ def test_using_enum_in_struct() -> None:
752
+ content = """
753
+ struct S {
754
+ using enum fruit;
755
+ };
756
+ """
757
+ data = parse_string(content, cleandoc=True)
758
+
759
+ assert data == ParsedData(
760
+ namespace=NamespaceScope(
761
+ classes=[
762
+ ClassScope(
763
+ class_decl=ClassDecl(
764
+ typename=PQName(
765
+ segments=[NameSpecifier(name="S")], classkey="struct"
766
+ )
767
+ ),
768
+ using=[
769
+ UsingDecl(
770
+ typename=PQName(
771
+ segments=[NameSpecifier(name="fruit")], classkey="enum"
772
+ ),
773
+ access="public",
774
+ )
775
+ ],
776
+ )
777
+ ]
778
+ )
779
+ )