Skip to content

Commit 5db77de

Browse files
committed
#61 - черновик иерархии ключей символов
1 parent 7384664 commit 5db77de

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace HydraScript.Domain.IR;
2+
3+
public interface ISymbolId
4+
{
5+
string Value { get; }
6+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace HydraScript.Domain.IR.Impl.SymbolIds;
2+
3+
public class FunctionSymbolId(
4+
string id,
5+
IEnumerable<Type> parameters) : ISymbolId
6+
{
7+
public string Value { get; } =
8+
$"function {id}({string.Join(", ", parameters)})";
9+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace HydraScript.Domain.IR.Impl.SymbolIds;
2+
3+
public class NamedSymbolId(string name) : ISymbolId
4+
{
5+
public string Value { get; } = name;
6+
}

0 commit comments

Comments
 (0)