- have and only have one
main
function with return typeint
. - no parameters.
-
return
statement can be ignored. - if has
return
, can only returnint
. -
main
can't be used as class name or other functions' name.
-
break
andcontinue
can only be used infor
andwhile
loop. -
if
'scondition
can only be bool. -
for-loop
condition can only be bool.
-
return type
matchdeclaration
. -
non-void
function must havereturn
statement. -
this
usage : regarded as atype
.
-
parameters
matcharguments
. - should have a
return
statement. - definition : right associative.
- check the scope's var.
- name can't be
builtin
types. -
constructor
: noreturn
statement, noparameters
. -
constructor
: same name. - other
function
name can't be the same asconstructor
.
- no
void
type for vars. -
var
can't support back reference. -
class
,function
support back reference. -
undefined
being used. -
Duplicate
forvars
,function
,class
, which means the three can't have the same name.
-
variable
can't bevoid
. -
creator
can't bevoid
.
- every expression has a type.
- any
conversion
is undefined behavior. -
assignment
match. -
field
,arugments
,method
matchdefinition
.
-
creator
has a type with dimension. -
creator
format (from left to right). -
dimension set
. -
subscript
expression.
-
ADD
,SUB
,...
can only be used on some specific types. -
logic
operator can only be used onbool
.
-
literal value
,function call
can't be left value. -
this
can't be assigned. -
a++
return aright value
. -
a++
,++a
:a
need to beleft value
. - function call can't be
left value
.
-
subscript
can only beint
. -
null
can only be assigned to reference type.