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