Skip to content

Commit 244b24d

Browse files
committed
Fixed using directive
1 parent 6e72849 commit 244b24d

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

src/syntax.grammar

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -334,18 +334,16 @@ RightShiftAssignment { '>' '>=' }
334334

335335
TypeIdentifier { identifier ~tid }
336336

337-
namespaceName { namespaceOrTypeName }
337+
typeName { namespace }
338338

339-
typeName { namespaceOrTypeName }
340-
341-
namespaceOrTypeNameAccess {
342-
!typeAccess '.' TypeIdentifier typeArgumentList? namespaceOrTypeNameAccess
339+
namespaceAccess {
340+
!typeAccess '.' TypeIdentifier typeArgumentList? namespaceAccess
343341
| !typeAccess '.' TypeIdentifier typeArgumentList?
344342
}
345343

346-
namespaceOrTypeName {
347-
TypeIdentifier typeArgumentList? namespaceOrTypeNameAccess?
348-
| QualifiedAliasMember namespaceOrTypeNameAccess?
344+
namespace {
345+
TypeIdentifier typeArgumentList? namespaceAccess?
346+
| QualifiedAliasMember namespaceAccess?
349347
}
350348

351349

@@ -1380,9 +1378,11 @@ externAliasDirective { kw<'extern'> kw<'alias'> identifier ';' }
13801378
// Using directive
13811379

13821380
usingDirective {
1383-
kw<'using'> TypeIdentifier '=' namespaceOrTypeName ';'
1384-
| kw<'global'>? kw<'using'> namespaceName ';'
1385-
| kw<'global'>? kw<'using'> kw<'static'> typeName ';'
1381+
kw<'global'>? kw<'using'> (kw<'static'> | (kw<'unsafe'>? nameEquals))? typeName ';'
1382+
}
1383+
1384+
nameEquals {
1385+
TypeIdentifier '='
13861386
}
13871387

13881388

0 commit comments

Comments
 (0)