![]() (for more info on transformation passes, see aforementioned Architecture document page) Be extensible, as far as writing a new syntax/type-structure transformation pass is concerned.Whenever possible, make automatic, semantically correct transformations that will save the user some time from doing it manually later.Try to do as much as possible of the tedious laborious work of converting syntax and getting it ready for the user to make the last manual changes that will inevitably be necessary.Try to produce code that functions as close as possible to the original Objective-C source, with no surprises.Always produce valid Swift syntax as output (not necessarily semantically valid, though).That being said, there are a couple of main goals that I have in mind going forward with this: This is mostly a side project of mine to train my Swift and architecture chops. The program should output the contents of the files you pass into the standard output. f, -follow-imports Follows #import declarations in files in order to parse other relevant files. swift files on the same folder as the input files. Saves output of conversion to the filedisk as. Prints the conversion results to the terminal's standard output w, -target Specifies the output target for the conversion. To the standard output for diagnosing rewriting issues. Provides a target file path to diagnose during rewriting.Īfter each intention pass and after expression passes, the file is written Which may increase compatibility with previous Obj-C code. This forces Swift to create Objective-C-compatible subclassing structures May be more performant in some circumstances depending on complexity of originalĮmits attributes on definitions, and emits NSObject subclass and NSObjectProtocol conformance on protocols. force-ll Forces ANTLR parsing to use LL prediction context, instead of making an attempt at SLL first. If not specified, thread allocation is defined by the system Specifies the number of threads to use when performing parsing, as well as intention and expression passes. v, -verbose Prints progress information to the console while performing a transpiling job. Prints extra information before each declaration and member about the inner logical decisions of intention passes as they change the structure of declarations. Prints the type of each top-level resolved expression statement found in function bodies. c, -colorize Pass this parameter as true to enable terminal colorization during output. swift file with a matching output name on the target path. s, -skip-confirm Skips asking for confirmation prior to parsing. exclude-pattern takes priority over -include-pattern Provides a pattern for including matches from the initial Objective-C files search. Provides a file pattern for excluding matches from the initial Objective-C files search. h/.m files to convert, before presenting a prompt to confirm conversion of files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |