@@ -30,6 +30,7 @@ let parseCompilerOptions projectText =
3030 // get conditional defines
3131 let defines =
3232 Regex.Matches( projectText, @" <DefineConstants[^>]*>([^<]*)<\/DefineConstants[^>]*>" )
33+ |> Seq.cast< Match>
3334 |> Seq.collect ( fun m -> m.Groups.[ 1 ]. Value.Split( ';' ))
3435 |> Seq.append [ " FABLE_COMPILER" ]
3536 |> Seq.map ( fun s -> s.Trim())
@@ -40,6 +41,7 @@ let parseCompilerOptions projectText =
4041 // get disabled warnings
4142 let nowarns =
4243 Regex.Matches( projectText, @" <NoWarn[^>]*>([^<]*)<\/NoWarn[^>]*>" )
44+ |> Seq.cast< Match>
4345 |> Seq.collect ( fun m -> m.Groups.[ 1 ]. Value.Split( ';' ))
4446 |> Seq.map ( fun s -> s.Trim())
4547 |> Seq.distinct
@@ -49,6 +51,7 @@ let parseCompilerOptions projectText =
4951 // get warnings as errors
5052 let warnAsErrors =
5153 Regex.Matches( projectText, @" <WarningsAsErrors[^>]*>([^<]*)<\/WarningsAsErrors[^>]*>" )
54+ |> Seq.cast< Match>
5255 |> Seq.collect ( fun m -> m.Groups.[ 1 ]. Value.Split( ';' ))
5356 |> Seq.map ( fun s -> s.Trim())
5457 |> Seq.distinct
@@ -58,6 +61,7 @@ let parseCompilerOptions projectText =
5861 // get other flags
5962 let otherFlags =
6063 Regex.Matches( projectText, @" <OtherFlags[^>]*>([^<]*)<\/OtherFlags[^>]*>" )
64+ |> Seq.cast< Match>
6165 |> Seq.collect ( fun m -> m.Groups.[ 1 ]. Value.Split( ' ' ))
6266 |> Seq.map ( fun s -> s.Trim())
6367 |> Seq.distinct
@@ -105,6 +109,7 @@ let parseProjectFile projectFileName =
105109 // get project references
106110 let projectRefs =
107111 Regex.Matches( projectText, @" <ProjectReference\s+[^>]*Include\s*=\s*("" [^"" ]*|'[^']*)" )
112+ |> Seq.cast< Match>
108113 |> Seq.map ( fun m -> m.Groups.[ 1 ]. Value.TrimStart( '"' ) .TrimStart( ''' ) .Trim() .Replace( " \\ " , " /" ))
109114 |> Seq.toArray
110115
@@ -118,6 +123,7 @@ let parseProjectFile projectFileName =
118123 let sourceFilesRegex = @" <Compile\s+[^>]*Include\s*=\s*("" [^"" ]*|'[^']*)"
119124 let sourceFiles =
120125 Regex.Matches( projectText, sourceFilesRegex)
126+ |> Seq.cast< Match>
121127 |> Seq.map ( fun m -> m.Groups.[ 1 ]. Value.TrimStart( '"' ) .TrimStart( ''' ) .Trim() .Replace( " \\ " , " /" ))
122128 |> Seq.toArray
123129
0 commit comments