diff options
Diffstat (limited to 'Dafny/DafnyAst.cs')
-rw-r--r-- | Dafny/DafnyAst.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Dafny/DafnyAst.cs b/Dafny/DafnyAst.cs index 27f06518..aba2bd92 100644 --- a/Dafny/DafnyAst.cs +++ b/Dafny/DafnyAst.cs @@ -247,6 +247,21 @@ namespace Microsoft.Dafny { }
}
}
+ public bool IsCoDatatype {
+ get {
+ return AsCoDatatype != null;
+ }
+ }
+ public CoDatatypeDecl AsCoDatatype {
+ get {
+ UserDefinedType udt = this as UserDefinedType;
+ if (udt == null) {
+ return null;
+ } else {
+ return udt.ResolvedClass as CoDatatypeDecl;
+ }
+ }
+ }
public bool IsTypeParameter {
get {
UserDefinedType ct = this as UserDefinedType;
|