Skip to content

Commit

Permalink
Update ValueDomain.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
LPeter1997 committed Oct 3, 2023
1 parent fae6072 commit d014e2f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Draco.Compiler/Internal/FlowAnalysis/Domain/ValueDomain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ namespace Draco.Compiler.Internal.FlowAnalysis.Domain;
/// </summary>
internal abstract class ValueDomain
{
// TODO: Docs
/// <summary>
/// Creates a domain for the given <paramref name="type"/>.
/// </summary>
/// <param name="intrinsics">The intrinsics for the compilation.</param>
/// <param name="type">The type to create the domain for.</param>
/// <returns>The domain representing <paramref name="type"/>.</returns>
public static ValueDomain CreateDomain(IntrinsicSymbols intrinsics, TypeSymbol type)
{
if (SymbolEqualityComparer.Default.Equals(type, intrinsics.Int32))
Expand All @@ -21,7 +26,11 @@ public static ValueDomain CreateDomain(IntrinsicSymbols intrinsics, TypeSymbol t
throw new ArgumentOutOfRangeException(nameof(type));
}

// TODO: Docs
/// <summary>
/// Stringifies the given <paramref name="pattern"/> to a user-readable format.
/// </summary>
/// <param name="pattern">The pattern to stringify.</param>
/// <returns>The user-readable form of <paramref name="pattern"/>.</returns>
public static string ToDisplayString(BoundPattern pattern) => pattern switch
{
_ => throw new ArgumentOutOfRangeException(nameof(pattern)),
Expand Down

0 comments on commit d014e2f

Please sign in to comment.