• Daniel Clifford's avatar
    [torque] Improve formatting in format-torque · f088840a
    Daniel Clifford authored
    Issues/problems addressed:
    
    - Fix line-wrapping and indenting for long declarations including strings,
      e.g. generates and constexpr clauses.
    - Implement proper formatting for typeswitch statements
    - Fix formatting of operator declarations
    - Fix formatting of constexpr if-clauses (the constexpr is now included on the
      same line as the if and it doesn't mess up the formatting that
    - Fix formatting of label declarations on callables, the "label" keyword now
      always starts a new line with indentation.
    - Remove space after identifier name in generic parameter declarations, e.g.
      "<a : T>" is now "<a: T>" which is consistent with type specification
      formatting elsewhere.
    - Indent "otherwise" clauses that have been pushed to the next line.
    
    Also ran the formatter over all existing .tq files.
    
    Bug: v8:7793
    Change-Id: I5adbb2ffa3d573deed062f9a5c1da57348c8fc71
    Reviewed-on: https://chromium-review.googlesource.com/1238580
    Commit-Queue: Daniel Clifford <danno@chromium.org>
    Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#56158}
    f088840a
data-view.tq 31.7 KB