forked from google/xls
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DSLX:fmt] Address new reflow example.
This moves us to (hzeller@ suggested) policy of having the "opening" character on the line with the leader, to indicate to the reader that the construct continues on the subsequent line. This change introduces a distinction of the notion of "blocked expression" on AST nodes -- there are blocked expressions that have "leader characters" (e.g. an invocation has a callee as leading characters), and those that do not (e.g. a block just has an open curl so constant and small amount of characters to open the construct). This uncovered a case where the semicolon doesn't fit in the line -- I'll address this in a followon CL, I think to retain the greedy properties we'll reduce the page width by one when emitting the statement so that we know we always have space to put the semicolon inline afterwards, so we can avoid a semicolon on its own line. PiperOrigin-RevId: 584145148
- Loading branch information
1 parent
c52230a
commit c1a5d1d
Showing
6 changed files
with
129 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.