Skip to content

Commit

Permalink
feature: add support for asymmetric visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangjchandler committed Dec 22, 2024
1 parent d68d2cc commit 9072f0a
Show file tree
Hide file tree
Showing 10 changed files with 755 additions and 261 deletions.
20 changes: 17 additions & 3 deletions crates/ast/meta/ast.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1382,15 +1382,20 @@ ContinueStatement:

VisibilityModifier:
as: Enum
node: false
Public: Span
Protected: Span
Private: Span

PromotedPropertyModifier:
as: Enum
node: false
Public: Span
Protected: Span
Private: Span
PublicSet: Span
ProtectedSet: Span
PrivateSet: Span
Readonly: Span

PromotedPropertyModifierGroup:
Expand All @@ -1400,9 +1405,13 @@ PromotedPropertyModifierGroup:

PropertyModifier:
as: Enum
node: false
Public: Span
Protected: Span
Private: Span
PublicSet: Span
ProtectedSet: Span
PrivateSet: Span
Static: Span
Readonly: Span

Expand All @@ -1413,6 +1422,7 @@ PropertyModifierGroup:

MethodModifier:
as: Enum
node: false
Public: Span
Protected: Span
Private: Span
Expand All @@ -1427,6 +1437,7 @@ MethodModifierGroup:

ClassModifier:
as: Enum
node: false
Abstract: Span
Final: Span
Readonly: Span
Expand All @@ -1438,6 +1449,7 @@ ClassModifierGroup:

ConstantModifier:
as: Enum
node: false
Public: Span
Protected: Span
Private: Span
Expand Down Expand Up @@ -1722,6 +1734,7 @@ SpecialName:

SpecialNameKind:
as: Enum
node: false
derive: Copy
Self_: Span
Parent: Span
Expand Down Expand Up @@ -1769,7 +1782,7 @@ PropertyHookList:
right_brace: Span

PropertyHook:
children: [kind, parameters?, body]
children: [parameters?, body]
span: Span
kind: PropertyHookKind
parameters: Option<FunctionParameterList>
Expand Down Expand Up @@ -1804,6 +1817,7 @@ ConcretePropertyHookBodyExpression:

PropertyHookKind:
as: Enum
node: false
Get: Span
Set: Span
Invalid: Span
Expand Down Expand Up @@ -1864,15 +1878,15 @@ TraitUsageAdaptationKind:
Precedence: TraitUsageAdaptationPrecedence

TraitUsageAdaptationAlias:
children: [r#trait?, method, alias, visibility?]
children: [r#trait?, method, alias]
span: Span
r#trait: Option<Name>
method: SimpleIdentifier
alias: SimpleIdentifier
visibility: Option<VisibilityModifier>

TraitUsageAdaptationVisibility:
children: [r#trait?, method, visibility]
children: [r#trait?, method]
span: Span
r#trait: Option<Name>
method: SimpleIdentifier
Expand Down
Loading

0 comments on commit 9072f0a

Please sign in to comment.