Skip to content

Commit

Permalink
Add doc comment for writerEvent (#2480)
Browse files Browse the repository at this point in the history
* Add doc comment for writerEvent

* Update src/Fantomas.Core/Context.fs

Co-authored-by: dawe <dawedawe@posteo.de>

Co-authored-by: dawe <dawedawe@posteo.de>
  • Loading branch information
nojaf and dawedawe committed Sep 7, 2022
1 parent 19633ec commit b0916a4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Fantomas.Core/Context.fs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,12 @@ type internal Context =
| [] -> false
| triviaInstructions -> List.exists (fun ti -> RangeHelpers.rangeEq ti.Range range) triviaInstructions

let writerEvent e ctx =
/// This adds a WriterEvent to the Context.
/// One event could potentially be split up into multiple events.
/// The event is also being processed in the WriterModel of the Context.
let writerEvent (e: WriterEvent) (ctx: Context) : Context =
// One event could contain a multiline string or code comments.
// These need to be split up in multiple events.
let evs = WriterEvents.normalize e

let ctx' =
Expand Down

0 comments on commit b0916a4

Please sign in to comment.