Preliminary list of keywords
This commit is contained in:
@@ -73,7 +73,7 @@ function
|
||||
;
|
||||
|
||||
functionRest
|
||||
: SimpleName typeParameters? functionParameters (":" type)? functionBody?
|
||||
: attributes SimpleName typeParameters? functionParameters (":" type)? functionBody?
|
||||
;
|
||||
|
||||
functionBody
|
||||
@@ -82,7 +82,7 @@ functionBody
|
||||
;
|
||||
|
||||
property
|
||||
: modifiers "lazy"? ("val" | "var") propertyRest
|
||||
: modifiers ("val" | "var") propertyRest
|
||||
;
|
||||
|
||||
propertyRest
|
||||
|
||||
@@ -10,3 +10,73 @@ CharacterLiteral : /*character as in Java*/;
|
||||
StringWithTemplates : /*single-quoted string, $ can be escaped*/;
|
||||
NoEscapeString : /* """-quoted string */;
|
||||
|
||||
/* Symbols:
|
||||
|
||||
[](){}<>
|
||||
,
|
||||
.
|
||||
:
|
||||
<= >= == != === !==
|
||||
+ - * / %
|
||||
=
|
||||
+= -= *= /=
|
||||
++ -- !
|
||||
&& || -- may be just & and |
|
||||
=>
|
||||
..
|
||||
?
|
||||
*/
|
||||
|
||||
/* Keywords:
|
||||
namespace
|
||||
import
|
||||
as
|
||||
type
|
||||
class
|
||||
this
|
||||
val
|
||||
var
|
||||
fun
|
||||
decomposer -- may be soft
|
||||
extension
|
||||
for
|
||||
null
|
||||
typeof
|
||||
new
|
||||
true
|
||||
false
|
||||
is
|
||||
isnot
|
||||
in
|
||||
throw
|
||||
return
|
||||
break
|
||||
continue
|
||||
object
|
||||
if
|
||||
else
|
||||
while
|
||||
do
|
||||
match
|
||||
extension
|
||||
|
||||
|
||||
Soft:
|
||||
wraps -- in a class header
|
||||
where -- in class, function and type headers
|
||||
by -- in a class header (Delegation specifier)
|
||||
lazy -- in a property/parameter declaration
|
||||
get, set -- in a property definition
|
||||
abstract
|
||||
virtual
|
||||
enum
|
||||
extendable -- or open
|
||||
attribute
|
||||
override
|
||||
private
|
||||
public
|
||||
internal
|
||||
protected
|
||||
out
|
||||
ref
|
||||
*/
|
||||
@@ -18,6 +18,7 @@ constantPattern
|
||||
: literalConstant
|
||||
;
|
||||
|
||||
|
||||
tuplePattern
|
||||
: "(" ((SimpleName "=")? pattern{","})? ")"
|
||||
;
|
||||
|
||||
@@ -24,6 +24,7 @@ toplevelObject
|
||||
: extension
|
||||
: function
|
||||
: property
|
||||
: typedef
|
||||
;
|
||||
|
||||
namespace
|
||||
@@ -31,4 +32,8 @@ namespace
|
||||
import*
|
||||
toplevelObject*
|
||||
"}"
|
||||
;
|
||||
|
||||
typedef
|
||||
: modifiers "type" SimpleName typeParameters? "=" type
|
||||
;
|
||||
Reference in New Issue
Block a user