Menu

#85 Support for swift language?

1.0
closed
nobody
None
2023-04-16
2014-09-30
No

Just wondering if it's possible to use astyle with swift files? I've tried forcing it to use "Objective-C" style (astyle --style=allman --align-method-colon --mode=c AppDelegate.swift ), but I still seem to get it tabbing in for variable declarations.

Any pointers appreciated!

var g1:
NSMutableArray = NSMutableArray()        
.................var g2:
.................NSArray = NSArray()         
...........................var g3:
...........................NSMutableArray = NSMutableArray()              
...................................var g4:
...................................NSMutableDictionary = NSMutableDictionary()    
...........................................var g5:
...........................................NSMutableArray = NSMutableArray()

Discussion

  • Jim Pattee

    Jim Pattee - 2018-01-28

    Ticket moved from /p/astyle/bugs/306/

     
  • André Simon

    André Simon - 2023-04-16
    • status: open --> closed
    • Milestone: --> 1.0
     
  • André Simon

    André Simon - 2023-04-16

    Hi, the astyle parser relies on C code conventions. Other languages might have suble syntax variations which could cause inproper formatting or indentation, which then require some workarounds in the astyle code. In the coming releases we focus on improved support of modern C++ features and refactoring, so new languages will not be added soon.

     

Log in to post a comment.