Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paebbels/synthesis #7

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from
Draft
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
36 changes: 36 additions & 0 deletions pyEDAA/Reports/Log/Synthesis.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
from typing import List

from pyTooling.Decorators import export
from pyEDAA.ProjectModel import File

from pyEDAA.Reports.Log import Entry as Log_Entry


@export
class SourceCodePosition:
"""
Represents a position in a source code file as a ragged 2 dimensional ``Row``:``Column`` position.
"""

Row : int #: Row or line in the document
Column : int #: Column in the document

def __init__(self, row : int, column : int):
self.Row = row
self.Column = column

def __str__(self):
"""Returns a string representation."""
return "(line: {0}, col: {1})".format(self.Row, self.Column)

def __repr__(self):
"""Returns a string representation in ``row:col`` format."""
return "{0}:{1})".format(self.Row, self.Column)


@export
class Entry(Log_Entry):
_file: File
_position: SourceCodePosition
_codeObject: str
_linkedEntries: List["Entry"]
9 changes: 9 additions & 0 deletions pyEDAA/Reports/Log/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from pyTooling.Decorators import export

from pyEDAA.Reports import Severity


@export
class Entry:
_severity: Severity
_message: str
Loading