@@ -424,6 +424,78 @@ public void AddAttributes(Attributes attributes)
424424 #endregion
425425 }
426426
427+ public partial class UdtDeclarationContext : IIdentifierContext , IAnnotatedContext
428+ {
429+ #region IIdentifierContext
430+ public Interval IdentifierTokens
431+ {
432+ get
433+ {
434+ Interval tokenInterval ;
435+ Identifier . GetName ( this , out tokenInterval ) ;
436+ return tokenInterval ;
437+ }
438+ }
439+ #endregion
440+
441+ #region IAnnotatedContext
442+ public Attributes Attributes { get ; } = new Attributes ( ) ;
443+ public int AttributeTokenIndex => Start . TokenIndex - 1 ;
444+
445+ private readonly List < AnnotationContext > _annotations = new List < AnnotationContext > ( ) ;
446+ public IEnumerable < AnnotationContext > Annotations => _annotations ;
447+
448+ public void Annotate ( AnnotationContext annotation )
449+ {
450+ _annotations . Add ( annotation ) ;
451+ }
452+
453+ public void AddAttributes ( Attributes attributes )
454+ {
455+ foreach ( var attribute in attributes )
456+ {
457+ Attributes . Add ( new AttributeNode ( attribute . Name , attribute . Values ) ) ;
458+ }
459+ }
460+ #endregion
461+ }
462+
463+ public partial class UdtMemberContext : IIdentifierContext , IAnnotatedContext
464+ {
465+ #region IIdentifierContext
466+ public Interval IdentifierTokens
467+ {
468+ get
469+ {
470+ Interval tokenInterval ;
471+ Identifier . GetName ( this , out tokenInterval ) ;
472+ return tokenInterval ;
473+ }
474+ }
475+ #endregion
476+
477+ #region IAnnotatedContext
478+ public Attributes Attributes { get ; } = new Attributes ( ) ;
479+ public int AttributeTokenIndex => Start . TokenIndex - 1 ;
480+
481+ private readonly List < AnnotationContext > _annotations = new List < AnnotationContext > ( ) ;
482+ public IEnumerable < AnnotationContext > Annotations => _annotations ;
483+
484+ public void Annotate ( AnnotationContext annotation )
485+ {
486+ _annotations . Add ( annotation ) ;
487+ }
488+
489+ public void AddAttributes ( Attributes attributes )
490+ {
491+ foreach ( var attribute in attributes )
492+ {
493+ Attributes . Add ( new AttributeNode ( attribute . Name , attribute . Values ) ) ;
494+ }
495+ }
496+ #endregion
497+ }
498+
427499 public partial class IdentifierStatementLabelContext : IIdentifierContext , IAnnotatedContext
428500 {
429501 #region IIdentifierContext
0 commit comments