コード例 #1
0
ファイル: CodeFormat.cs プロジェクト: hultqvist/lax
 public static string Format(LaxType type)
 {
     string s = Format(type.Type);
     if (type.Unit.HasUnit)
         s += "[" + type.Unit + "]";
     return s;
 }
コード例 #2
0
ファイル: TypeEvaluator.cs プロジェクト: hultqvist/lax
 public static LaxType GetType(LaxType left, BinaryOp op, LaxType right)
 {
     return new LaxType(
         GetTypes(left.Type, op, right.Type),
         GetUnit(left.Unit, op, right.Unit)
         );
 }