This commit is contained in:
Zahary Karadjov 2013-05-25 15:19:03 +03:00
commit 7fccdedcb5
5 changed files with 192 additions and 105 deletions

View file

@ -207,6 +207,11 @@ proc makeTypeDesc*(c: PContext, typ: PType): PType =
proc newTypeS(kind: TTypeKind, c: PContext): PType =
result = newType(kind, getCurrOwner())
proc newTypeWithSons*(c: PContext, kind: TTypeKind,
sons: seq[PType]): PType =
result = newType(kind, getCurrOwner())
result.sons = sons
proc errorType*(c: PContext): PType =
## creates a type representing an error state
result = newTypeS(tyError, c)