Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ jobs:

- name: Pack Libraries
run: |
dotnet pack Generator/Esolang.Piet.Generator.csproj -c Release -o artifacts/nuget
dotnet pack Parser/Esolang.Piet.Parser.csproj -c Release -o artifacts/nuget
dotnet pack Processor/Esolang.Piet.Processor.csproj -c Release -o artifacts/nuget
dotnet pack Interpreter/Esolang.Piet.Interpreter.csproj -c Release -o artifacts/aot --no-build
dotnet pack Generator/Esolang.Piet.Generator.csproj -c Release -o artifacts/nuget --no-build
dotnet pack Parser/Esolang.Piet.Parser.csproj -c Release -o artifacts/nuget --no-build
dotnet pack Processor/Esolang.Piet.Processor.csproj -c Release -o artifacts/nuget --no-build

- name: Publish to NuGet.org
env:
Expand Down
10 changes: 5 additions & 5 deletions Processor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dotnet add package Esolang.Piet.Processor

### Basic Usage (Event Streaming)

イベントをストリーミングして処理する場合の基本的なアプローチです。
This is the basic approach for processing events as a stream.

```csharp
using Esolang.Piet.Parser;
Expand All @@ -32,21 +32,21 @@ await foreach (var ev in processor.RunAsyncEnumerable())

### Simplified Execution (Extensions)

`Esolang.Processor.Extensions.IO` パッケージを使用して、終了コードと出力先を指定して簡潔に実行するアプローチです。
This approach uses the `Esolang.Processor.Extensions.IO` package to run the processor with an explicit exit code and output target.

```csharp
using Esolang.Piet.Parser;
using Esolang.Piet.Processor;
using Esolang.Processor;
using Esolang.Processor.Extensions.IO; // Esolang.Processor.Extensions.IO パッケージが必要
using Esolang.Processor.Extensions.IO; // Requires the Esolang.Processor.Extensions.IO package

var program = PietParser.Parse("hello-world.png");
var processor = new PietProcessor(program);

// 出力先を準備
// Prepare an output sink
using var output = new StringWriter();

// 実行して終了コードを取得(出力はTextWriter引数経由)
// Execute and get the exit code (output is written through the TextWriter argument)
int exitCode = await processor.RunToEndAsync(output: output);

Console.WriteLine($"Exit code: {exitCode}");
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ For detailed Generator signatures, patterns, and source specification (including

| Attribute Argument | `partial` Method Parameters (Input) | `partial` Method Return Types (Output) |
| :--- | :--- | :--- |
| `string` (Path/Inline) | `byte[]?` (Image Data) | `void`, `string`, `string?`, `int`, `Task`, `ValueTask`, `IEnumerable<byte>`, `IAsyncEnumerable<byte>` |
| `string` (Path/Inline) | `string`, `TextReader`, `PipeReader` | `void`, `int`, `Task<int>`, `ValueTask<int>`, `string`, `Task<string>`, `ValueTask<string>`, `IEnumerable<byte>`, `IAsyncEnumerable<byte>` |

## Implementation Status

Expand Down
Loading