From 900c42823f0661107543716a247bec22f01cd9cc Mon Sep 17 00:00:00 2001 From: leino Date: Thu, 21 Aug 2014 21:03:52 -0700 Subject: Changed syntax of derived types to "newtype" Added parsing of constraints (beyond parsing is yet to come) --- Util/Emacs/dafny-mode.el | 2 +- Util/latex/dafny.sty | 2 +- Util/vim/dafny.vim | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Util') diff --git a/Util/Emacs/dafny-mode.el b/Util/Emacs/dafny-mode.el index d589fb78..6482ff28 100644 --- a/Util/Emacs/dafny-mode.el +++ b/Util/Emacs/dafny-mode.el @@ -30,7 +30,7 @@ ]\\)*" . font-lock-comment-face) `(,(dafny-regexp-opt '( - "class" "datatype" "codatatype" "type" "iterator" + "class" "datatype" "codatatype" "newtype" "type" "iterator" "trait" "extends" "function" "predicate" "copredicate" "ghost" "var" "method" "lemma" "constructor" "colemma" diff --git a/Util/latex/dafny.sty b/Util/latex/dafny.sty index 40b994ba..dc0d18c7 100644 --- a/Util/latex/dafny.sty +++ b/Util/latex/dafny.sty @@ -5,7 +5,7 @@ \usepackage{listings} \lstdefinelanguage{dafny}{ - morekeywords={class,datatype,codatatype,type,iterator,trait,extends, + morekeywords={class,datatype,codatatype,newtype,type,iterator,trait,extends, bool,nat,int,real,object,set,multiset,seq,array,array2,array3,map, function,predicate,copredicate, ghost,var,static,refines, diff --git a/Util/vim/dafny.vim b/Util/vim/dafny.vim index 58820c0f..92c0b079 100644 --- a/Util/vim/dafny.vim +++ b/Util/vim/dafny.vim @@ -7,7 +7,7 @@ syntax clear syntax case match syntax keyword dafnyFunction function predicate copredicate syntax keyword dafnyMethod method lemma constructor colemma -syntax keyword dafnyTypeDef class datatype codatatype type iterator trait extends +syntax keyword dafnyTypeDef class datatype codatatype newtype type iterator trait extends syntax keyword dafnyModule abstract module import opened as default syntax keyword dafnyConditional if then else match case syntax keyword dafnyRepeat while -- cgit v1.2.3