diff options
author | Jason Koenig <unknown> | 2012-07-17 15:35:27 -0700 |
---|---|---|
committer | Jason Koenig <unknown> | 2012-07-17 15:35:27 -0700 |
commit | caf298f8cab0138c0dde7328b0565642094256a7 (patch) | |
tree | 1e517562f5ce6bcdcee2d648e3695ece7462511b /Source/Dafny/Dafny.atg | |
parent | 7c5b29cfb26c4fe04de732ae7f79d12d840c679e (diff) |
Dafny: compilation of abstract modules, including local definitions (as in module A as B = C)
* * *
Dafny: compilation of abstract modules, including local definitions (as in module A as B = C)
Diffstat (limited to 'Source/Dafny/Dafny.atg')
-rw-r--r-- | Source/Dafny/Dafny.atg | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/Dafny/Dafny.atg b/Source/Dafny/Dafny.atg index 5efbd57b..52639f07 100644 --- a/Source/Dafny/Dafny.atg +++ b/Source/Dafny/Dafny.atg @@ -172,7 +172,7 @@ SubModuleDecl<ModuleDefinition parent, bool isOverallModuleGhost, out ModuleDecl = (. ClassDecl/*!*/ c; DatatypeDecl/*!*/ dt; ArbitraryTypeDecl at;
Attributes attrs = null; IToken/*!*/ id;
List<MemberDecl/*!*/> namedModuleDefaultClassMembers = new List<MemberDecl>();;
- List<IToken> idRefined = null, idPath = null;
+ List<IToken> idRefined = null, idPath = null, idAssignment = null;
bool isGhost = false;
ModuleDefinition module;
ModuleDecl sm;
@@ -202,7 +202,10 @@ SubModuleDecl<ModuleDefinition parent, bool isOverallModuleGhost, out ModuleDecl ) |
"=" QualifiedName<out idPath> ";" (. submodule = new AliasModuleDecl(idPath, id, parent); .)
|
- "as" QualifiedName<out idPath> ";" (.submodule = new AbstractModuleDecl(idPath, id, parent); .)
+ ( "as" QualifiedName<out idPath>
+ ["=" QualifiedName<out idAssignment> ]
+ ";" (.submodule = new AbstractModuleDecl(idPath, id, parent, idAssignment); .)
+ )
)
.
@@ -700,7 +703,7 @@ PossiblyWildFrameExpression<out FrameExpression/*!*/ fe> )
.
FrameExpression<out FrameExpression/*!*/ fe>
-= (. Contract.Ensures(Contract.ValueAtReturn(out fe) != null); Expression/*!*/ e; IToken/*!*/ id; string fieldName = null; .)
+= (. Contract.Ensures(Contract.ValueAtReturn(out fe) != null); Expression/*!*/ e; IToken/*!*/ id; string fieldName = null; fe = null; .)
(( Expression<out e>
[ "`" Ident<out id> (. fieldName = id.val; .)
]
|