Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
pip install -r requirements.txt

- name: Run mypy
run: mypy .
run: mypy src/cpp_fqn_parser
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@ Scope(name='one_3hello0', template=None)
Scope(name='tconstwo', template='<mytemplate>')

```

## Installation
```commandline
pip install git+https://github.com/Cliper27/cpp_fqn_parser.git
```
29 changes: 29 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "cpp_fqn_parser"
version = "0.1.0"
description = "C++ FQN parser and tokenizer"
readme = "README.md"
license = { file = "LICENSE" }
authors = [{ name="Cliper27" }]
requires-python = ">=3.10"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]

[tool.setuptools]
package-dir = {"" = "src"}

[tool.setuptools.packages.find]
where = ["src"]

[project.urls]
Homepage = "https://github.com/Cliper27/cpp_fqn_parser"
Binary file modified requirements.txt
Binary file not shown.
4 changes: 3 additions & 1 deletion src/__init__.py → src/cpp_fqn_parser/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
__version__ = "0.1.0"

from .tokenizer import Tokenizer
from .parser import Parser
from .token import Token
from .fqn import FQN
from .token import Token
from .scope import Scope
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 1 addition & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

import pytest

from src.token import Token
from src.fqn import FQN
from src.scope import Scope
from src.cpp_fqn_parser import Token, FQN, Scope


@pytest.fixture
Expand Down
3 changes: 1 addition & 2 deletions tests/test_parser.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from src.parser import Parser
from src.fqn import FQN
from src.cpp_fqn_parser import Parser, FQN


def test_simple_fqn(simple_fqn_input: str, simple_parser_expected: FQN) -> None:
Expand Down
3 changes: 1 addition & 2 deletions tests/test_tokenizer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from typing import List

from src.tokenizer import Tokenizer
from src.token import Token
from src.cpp_fqn_parser import Tokenizer, Token


def test_simple_fqn(simple_fqn_input: str, simple_tokenizer_expected: List[Token]) -> None:
Expand Down