OSDN Git Service
(root)
/
bytom
/
equity.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a03f9c
)
fix contract exceptd check (#22)
author
oysheng
<33340252+oysheng@users.noreply.github.com>
Thu, 25 Oct 2018 09:05:10 +0000
(17:05 +0800)
committer
Paladz
<yzhu101@uottawa.ca>
Thu, 25 Oct 2018 09:05:10 +0000
(17:05 +0800)
compiler/parse.go
patch
|
blob
|
history
diff --git
a/compiler/parse.go
b/compiler/parse.go
index
4848aee
..
956825e
100644
(file)
--- a/
compiler/parse.go
+++ b/
compiler/parse.go
@@
-48,6
+48,10
@@
func parse(buf []byte) (contracts []*Contract, err error) {
func parseContracts(p *parser) []*Contract {
var result []*Contract
+ if pos := scanKeyword(p.buf, p.pos, "contract"); pos < 0 {
+ p.errorf("expected contract")
+ }
+
for peekKeyword(p) == "contract" {
contract := parseContract(p)
result = append(result, contract)