From a2c47bdc6797684acf18859d94fb5ac7a325dc9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20M=C3=BCller?= Date: Sun, 24 May 2020 14:17:53 -0700 Subject: [PATCH] add grammar --- runtime/parser2/transaction.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/runtime/parser2/transaction.go b/runtime/parser2/transaction.go index 2d1e79ca53..1b4b8d6b2a 100644 --- a/runtime/parser2/transaction.go +++ b/runtime/parser2/transaction.go @@ -8,6 +8,22 @@ import ( "github.com/onflow/cadence/runtime/parser2/lexer" ) +// parseTransactionDeclaration parses a transaction declaration. +// +// transactionDeclaration : 'transaction' +// parameterList? +// '{' +// fields +// prepare? +// preConditions? +// ( execute +// | execute postConditions +// | postConditions +// | postConditions execute +// | /* no execute or postConditions */ +// ) +// '}' +// func parseTransactionDeclaration(p *parser) *ast.TransactionDeclaration { startPos := p.current.StartPos