Add support for relative include
This commit is contained in:
parent
b8e2f8a4d7
commit
1f22745e05
@ -169,6 +169,7 @@ class CFunc:
|
|||||||
class CInclude:
|
class CInclude:
|
||||||
header: Union[str, "CHeader"]
|
header: Union[str, "CHeader"]
|
||||||
local: bool = False
|
local: bool = False
|
||||||
|
same_dir: bool = False
|
||||||
|
|
||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
if isinstance(self.header, CHeader):
|
if isinstance(self.header, CHeader):
|
||||||
@ -179,6 +180,9 @@ class CInclude:
|
|||||||
if self.local:
|
if self.local:
|
||||||
open_symbol = '"'
|
open_symbol = '"'
|
||||||
close_symbol = '"'
|
close_symbol = '"'
|
||||||
|
|
||||||
|
if self.same_dir:
|
||||||
|
name = f"./{name}"
|
||||||
else:
|
else:
|
||||||
open_symbol = '<'
|
open_symbol = '<'
|
||||||
close_symbol = '>'
|
close_symbol = '>'
|
||||||
|
Loading…
Reference in New Issue
Block a user