[parsing] Prepare Iceshrimp.Parsing project for wasm compilation
This commit is contained in:
parent
799d1054a9
commit
53b9e97630
2 changed files with 8 additions and 0 deletions
|
@ -5,6 +5,12 @@
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup Condition="'$(WASM)' == 'true'">
|
||||||
|
<RuntimeIdentifier>browser-wasm</RuntimeIdentifier>
|
||||||
|
<PublishTrimmed>true</PublishTrimmed>
|
||||||
|
<RunAOTCompilation>true</RunAOTCompilation>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="SearchQuery.fs"/>
|
<Compile Include="SearchQuery.fs"/>
|
||||||
<Compile Include="Mfm.fs" />
|
<Compile Include="Mfm.fs" />
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
namespace Iceshrimp.Parsing
|
namespace Iceshrimp.Parsing
|
||||||
|
|
||||||
open System
|
open System
|
||||||
|
open System.Runtime.InteropServices.JavaScript
|
||||||
open FParsec
|
open FParsec
|
||||||
|
|
||||||
module SearchQueryFilters =
|
module SearchQueryFilters =
|
||||||
|
@ -247,6 +248,7 @@ module private SearchQueryParser =
|
||||||
module SearchQuery =
|
module SearchQuery =
|
||||||
open SearchQueryParser
|
open SearchQueryParser
|
||||||
|
|
||||||
|
[<JSExport>]
|
||||||
let parse str =
|
let parse str =
|
||||||
match run parse str with
|
match run parse str with
|
||||||
| Success(result, _, _) -> result
|
| Success(result, _, _) -> result
|
||||||
|
|
Loading…
Add table
Reference in a new issue