Skip to content

Commit

Permalink
Refactor processing step
Browse files Browse the repository at this point in the history
  • Loading branch information
planetis-m committed Oct 27, 2024
1 parent 2352c52 commit a82c90f
Show file tree
Hide file tree
Showing 3 changed files with 239 additions and 139 deletions.
9 changes: 1 addition & 8 deletions tools/wrapper/naylib_wrapper.nim
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ proc parseCommandLine(outputpath, configpath: var string): bool =
discard
result = outputpath.len > 0 and configpath.len > 0

proc processApi(ctx: var ApiContext, config: ConfigData) =
filterIgnoredSymbols(ctx, config)
processStructs(ctx, config)
processEnums(ctx, config)
processAliases(ctx, config)
processFunctions(ctx, config)

proc generateWrapper(ctx: ApiContext; outputpath: string; config: ConfigData) =
var b = openBuilder(outputpath, header = config.cHeader)
genBindings(b, ctx, config.moduleHeader, config.afterEnums, config.afterObjects,
Expand All @@ -37,7 +30,7 @@ proc main =

let config = parseConfig(configpath)
var ctx = ApiContext(api: parseApi(config.apiDefinition))
processApi(ctx, config)
processApiTypes(ctx, config)
generateWrapper(ctx, outputpath, config)

main()
Loading

0 comments on commit a82c90f

Please sign in to comment.