ast2 static inline support
This commit is contained in:
parent
e17d6edb5e
commit
485c2f1ab2
2 changed files with 7 additions and 2 deletions
|
|
@ -1657,6 +1657,12 @@ proc processNode(nimState: NimState, node: TSNode): bool =
|
|||
nimState.addEnum(node)
|
||||
of "declaration":
|
||||
nimState.addDecl(node)
|
||||
of "function_definition":
|
||||
# Handle static inline
|
||||
let
|
||||
start = getStartAtom(node)
|
||||
if node[start+1].getName() == "function_declarator":
|
||||
nimState.addProc(node[start+1], node[start])
|
||||
else:
|
||||
# Unknown
|
||||
result = false
|
||||
|
|
|
|||
|
|
@ -568,8 +568,7 @@ proc getPreprocessor*(gState: State, fullpath: string): string =
|
|||
rdata.add line
|
||||
return rdata.join("\n").
|
||||
replace("__restrict", "").
|
||||
replace(re"__attribute__[ ]*\(\(.*?\)\)([ ,;])", "$1").
|
||||
removeStatic()
|
||||
replace(re"__attribute__[ ]*\(\(.*?\)\)([ ,;])", "$1")
|
||||
|
||||
converter toString*(kind: Kind): string =
|
||||
return case kind:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue