Skip to content

incorrect Position #166

Open
Open
@Thomasb81

Description

@Thomasb81

Hello

Position return by the tool is incorrect:
include.vh:

input a

test.v:



module my_module(
`include "include.vh"
);
endmodule

test.py

from hdlConvertorAst.language import Language
from hdlConvertor import HdlConvertor

c = HdlConvertor()
d = c.parse("test.v", Language.VERILOG, [])
print(d.objs[0])

Return

...
         'ports': [{'__class__': 'HdlIdDef',
                    'direction': 'IN',
                    'name': {'__class__': 'str', 'val': 'a'},
                    'position': (5, 1, 5, 7),
                    'type': 'wire'}],
...

5 refer to post processed source code which make no sens for an user.
We expect here an information as " include.vh, start_line 1, start_position 1,end_line 1, end_position 7"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions