Skip to content

Commit

Permalink
fsxc: refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
knocte committed Sep 4, 2024
1 parent bf62186 commit 697f824
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions fsxc/Fsxc.fs
Original file line number Diff line number Diff line change
Expand Up @@ -355,24 +355,26 @@ module Program =

if trimmedLine.StartsWith "#if"
&& line.Contains "LEGACY_FRAMEWORK" then
match trimmedLine with
| "#if LEGACY_FRAMEWORK" ->
let newState =
match trimmedLine with
| "#if LEGACY_FRAMEWORK" ->
#if LEGACY_FRAMEWORK
acc,
DeliverLinesUntilNextPreProcessorConditional
DeliverLinesUntilNextPreProcessorConditional
#else
acc, IgnoreLinesUntilNextPreProcessorConditional
IgnoreLinesUntilNextPreProcessorConditional
#endif
| "#if !LEGACY_FRAMEWORK" ->
| "#if !LEGACY_FRAMEWORK" ->
#if LEGACY_FRAMEWORK
acc, IgnoreLinesUntilNextPreProcessorConditional
IgnoreLinesUntilNextPreProcessorConditional
#else
acc,
DeliverLinesUntilNextPreProcessorConditional
DeliverLinesUntilNextPreProcessorConditional
#endif
| _ ->
failwith
"Only simple ifdef statements are supported for the LEGACY_FRAMEWORK define"

| _ ->
failwith
"Only simple ifdef statements are supported for the LEGACY_FRAMEWORK define"

acc, newState
else
noStateChange()

Expand Down

0 comments on commit 697f824

Please sign in to comment.