예제 #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
 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)
         );
 }