Skip to content

Commit 71cd9cc

Browse files
committed
Preparation work for type changes; see: #36
1 parent 1eb4c78 commit 71cd9cc

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

doc/bnf.x

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ ElseComposition
136136
Composition
137137
"extends" TypeExpression ArgumentList-opt
138138
"implements" ExtendedTypeExpression
139-
"delegates" ExtendedTypeExpression "(" Expression ")"
139+
"delegates" AnyTypeExpression "(" Expression ")"
140140
"incorporates" IncorporatesFinish
141-
"into" ExtendedTypeExpression
141+
"into" AnyTypeExpression
142142
ImportClause QualifiedName VersionRequirement-opt
143143
"default" "(" Expression ")"
144144

@@ -579,7 +579,7 @@ UsingStatement
579579
"using" "(" UsingResources ")" StatementBlock
580580

581581
TypeDefStatement
582-
"typedef" ExtendedTypeExpression "as" Name ";"
582+
"typedef" AnyTypeExpression "as" Name ";"
583583

584584
#
585585
# expressions
@@ -730,8 +730,8 @@ PostfixExpression
730730
PostfixExpression NoWhitespace "?"
731731
PostfixExpression "." "&"-opt Name TypeParameterTypeList-opt
732732
PostfixExpression ".new" NewFinish
733-
PostfixExpression ".as" "(" ExtendedTypeExpression ")"
734-
PostfixExpression ".is" "(" ExtendedTypeExpression ")"
733+
PostfixExpression ".as" "(" AnyTypeExpression ")"
734+
PostfixExpression ".is" "(" AnyTypeExpression ")"
735735

736736
ArrayDims
737737
"[" DimIndicators-opt "]"
@@ -1086,6 +1086,22 @@ TypeExpression
10861086
ExtendedTypeExpression
10871087
ExtendedUnionedTypeExpression
10881088

1089+
AnyTypeExpression
1090+
AnonTypeExpression
1091+
ExtendedTypeExpression
1092+
1093+
AnonTypeExpression
1094+
"{" NameOrSignatureList ";" "}" # note: at least one name or signature is required
1095+
1096+
NameOrSignatureList
1097+
NameOrSignature
1098+
NameOrSignatureList ";" NameOrSignature
1099+
1100+
NameOrSignature
1101+
Name # ref to 1+ property/method
1102+
PropertyModifiers-opt TypeExpression Name # property
1103+
MethodModifiers-opt TypeParameterList-opt MethodIdentity ParameterList # method
1104+
10891105
# '+' creates a union of two types; '-' creates a difference of two types
10901106
UnionedTypeExpression
10911107
IntersectingTypeExpression
@@ -1102,6 +1118,7 @@ IntersectingTypeExpression
11021118
IntersectingTypeExpression | NonBiTypeExpression
11031119

11041120
ExtendedIntersectingTypeExpression
1121+
AnonTypeExpression
11051122
ExtendedNonBiTypeExpression
11061123
ExtendedIntersectingTypeExpression | ExtendedNonBiTypeExpression
11071124

0 commit comments

Comments
 (0)