StructureExpression
using CLanguage.Compiler;
using CLanguage.Types;
using System;
using System.Collections.Generic;
using System.Linq;
namespace CLanguage.Syntax
{
public class StructureExpression : Expression
{
public class Item
{
public int Index;
public string Field;
public Expression Expression;
}
public List<Item> Items { get; set; }
public StructureExpression()
{
Items = new List<Item>();
}
public override string ToString()
{
return "{ " + string.Join(", ", from x in Items
select x.Expression.ToString()) + " }";
}
public override CType GetEvaluatedCType(EmitContext ec)
{
return CType.Void;
}
protected override void DoEmit(EmitContext ec)
{
throw new NotImplementedException();
}
}
}