@@ -16,6 +16,9 @@ declare_syntax_cat verityConstant
1616declare_syntax_cat verityImmutable
1717declare_syntax_cat verityExternal
1818declare_syntax_cat verityExternalLinkMode
19+ declare_syntax_cat verityInterface
20+ declare_syntax_cat verityInterfaceFunction
21+ declare_syntax_cat verityInterfaceParam
1922declare_syntax_cat verityLocalObligation
2023declare_syntax_cat verityLocalObligations
2124declare_syntax_cat verityConstructor
@@ -67,10 +70,17 @@ syntax "external " ident "(" sepBy(term, ",") ")" : verityExternal
6770syntax "external " ident "(" sepBy(term, "," ) ")" " -> " "(" sepBy(term, "," ) ")" : verityExternal
6871syntax "external " ident "(" sepBy(term, "," ) ")" ppSpace "linked_as" " := " verityExternalLinkMode : verityExternal
6972syntax "external " ident "(" sepBy(term, "," ) ")" " -> " "(" sepBy(term, "," ) ")" ppSpace "linked_as" " := " verityExternalLinkMode : verityExternal
73+ syntax ident " : " term : verityInterfaceParam
74+ syntax "function " ident "(" sepBy(term, "," ) ")" verityMutability* ident "(" sepBy(term, "," ) ")" : verityInterfaceFunction
75+ syntax "function " ident " (" sepBy(term, "," ) ")" verityMutability* ident "(" sepBy(term, "," ) ")" : verityInterfaceFunction
76+ syntax "function " ident "(" sepBy(verityInterfaceParam, "," ) ")" verityMutability* ident "(" sepBy(term, "," ) ")" : verityInterfaceFunction
77+ syntax "function " ident " (" sepBy(verityInterfaceParam, "," ) ")" verityMutability* ident "(" sepBy(term, "," ) ")" : verityInterfaceFunction
78+ syntax "interface " ident " where " verityInterfaceFunction* "end" : verityInterface
7079syntax ident " := " ident ppSpace str : verityLocalObligation
7180syntax "local_obligations " "[" sepBy(verityLocalObligation, "," ) "]" : verityLocalObligations
7281syntax "payable" : verityMutability
7382syntax "view" : verityMutability
83+ syntax "internal" : verityMutability
7484syntax pureMutabilityMarker := &"pure"
7585syntax "no_external_calls" : verityMutability
7686syntax "allow_post_interaction_writes" : verityMutability
@@ -158,6 +168,7 @@ syntax (name := verityContractCmd)
158168 ("event_defs " verityEvent+)?
159169 ("constants " verityConstant+)?
160170 ("immutables " verityImmutable+)?
171+ ("interfaces " verityInterface+)?
161172 ("linked_externals " verityExternal+)?
162173 (verityConstructor)?
163174 (veritySpecialEntrypoint)*
0 commit comments