feat: add keyword of functions

add keyword "view" for functions, to record functions that don't change contract status after execution
This commit is contained in:
Frank.R.Wu
2021-11-01 17:11:33 +08:00
parent 0dba1fe49a
commit 9fbca75af8
12 changed files with 1204 additions and 1171 deletions

View File

@@ -91,33 +91,34 @@ AtMostOnce=90
OnlyOnce=91
Global=92
Local=93
Class=94
Enum=95
Extends=96
Super=97
Const=98
Export=99
Import=100
Contract=101
Module=102
Oracle=103
Implements=104
Let=105
Private=106
Public=107
Interface=108
Package=109
Protected=110
Static=111
Yield=112
Identifier=113
StringLiteral=114
TemplateStringLiteral=115
WhiteSpaces=116
LineTerminator=117
HtmlComment=118
CDataComment=119
UnexpectedCharacter=120
View=94
Class=95
Enum=96
Extends=97
Super=98
Const=99
Export=100
Import=101
Contract=102
Module=103
Oracle=104
Implements=105
Let=106
Private=107
Public=108
Interface=109
Package=110
Protected=111
Static=112
Yield=113
Identifier=114
StringLiteral=115
TemplateStringLiteral=116
WhiteSpaces=117
LineTerminator=118
HtmlComment=119
CDataComment=120
UnexpectedCharacter=121
'['=4
']'=5
'('=6
@@ -202,22 +203,23 @@ UnexpectedCharacter=120
'ONLY_ONCE'=91
'global'=92
'local'=93
'class'=94
'enum'=95
'extends'=96
'super'=97
'const'=98
'export'=99
'import'=100
'contract'=101
'module'=102
'oracle'=103
'implements'=104
'let'=105
'private'=106
'public'=107
'interface'=108
'package'=109
'protected'=110
'static'=111
'yield'=112
'view'=94
'class'=95
'enum'=96
'extends'=97
'super'=98
'const'=99
'export'=100
'import'=101
'contract'=102
'module'=103
'oracle'=104
'implements'=105
'let'=106
'private'=107
'public'=108
'interface'=109
'package'=110
'protected'=111
'static'=112
'yield'=113