mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
Swift: some restructuring of codegen
Loading of the schema and dbscheme has been moved to a separate `loaders` package for better separation of concerns.
This commit is contained in:
@@ -17,6 +17,7 @@ import typing
|
||||
import inflection
|
||||
|
||||
from swift.codegen.lib import cpp, schema
|
||||
from swift.codegen.loaders import schemaloader
|
||||
|
||||
|
||||
def _get_type(t: str, add_or_none_except: typing.Optional[str] = None) -> str:
|
||||
@@ -90,7 +91,7 @@ class Processor:
|
||||
|
||||
def generate(opts, renderer):
|
||||
assert opts.cpp_output
|
||||
processor = Processor(schema.load_file(opts.schema))
|
||||
processor = Processor(schemaloader.load_file(opts.schema))
|
||||
out = opts.cpp_output
|
||||
for dir, classes in processor.get_classes().items():
|
||||
renderer.render(cpp.ClassList(classes, opts.schema,
|
||||
|
||||
Reference in New Issue
Block a user