/// <summary>
        /// Initializes a new instance of the <see cref="UvssNavigationExpressionSyntax"/> class.
        /// </summary>
        internal UvssNavigationExpressionSyntax(
            SyntaxToken pipeToken,
            UvssPropertyNameSyntax propertyName,
            UvssNavigationExpressionIndexerSyntax indexer,
            SyntaxToken asKeyword,
            UvssIdentifierBaseSyntax typeNameIdentifier)
            : base(SyntaxKind.NavigationExpression)
        {
            this.PipeToken = pipeToken;
            ChangeParent(pipeToken);

            this.PropertyName = propertyName;
            ChangeParent(propertyName);

            this.Indexer = indexer;
            ChangeParent(indexer);

            this.AsKeyword = asKeyword;
            ChangeParent(asKeyword);

            this.TypeNameIdentifier = typeNameIdentifier;
            ChangeParent(typeNameIdentifier);

            SlotCount = 5;
            UpdateIsMissing();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="UvssNavigationExpressionSyntax"/> class.
        /// </summary>
        internal UvssNavigationExpressionSyntax(
            SyntaxToken pipeToken,
            UvssPropertyNameSyntax propertyName,
            UvssNavigationExpressionIndexerSyntax indexer,
            SyntaxToken asKeyword,
            UvssIdentifierBaseSyntax typeNameIdentifier)
            : base(SyntaxKind.NavigationExpression)
        {
            this.PipeToken = pipeToken;
            ChangeParent(pipeToken);

            this.PropertyName = propertyName;
            ChangeParent(propertyName);

            this.Indexer = indexer;
            ChangeParent(indexer);

            this.AsKeyword = asKeyword;
            ChangeParent(asKeyword);

            this.TypeNameIdentifier = typeNameIdentifier;
            ChangeParent(typeNameIdentifier);

            SlotCount = 5;
            UpdateIsMissing();
        }
Example #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UvssPseudoClassSyntax"/> class.
        /// </summary>
        internal UvssPseudoClassSyntax(
            SyntaxToken colonToken,
            UvssIdentifierBaseSyntax classNameIdentifier)
            : base(SyntaxKind.PseudoClass)
        {
            this.ColonToken = colonToken;
            ChangeParent(colonToken);

            this.ClassNameIdentifier = classNameIdentifier;
            ChangeParent(classNameIdentifier);

            SlotCount = 2;
            UpdateIsMissing();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="UvssPseudoClassSyntax"/> class.
        /// </summary>
        internal UvssPseudoClassSyntax(
            SyntaxToken colonToken,
            UvssIdentifierBaseSyntax classNameIdentifier)
            : base(SyntaxKind.PseudoClass)
        {
            this.ColonToken = colonToken;
            ChangeParent(colonToken);

            this.ClassNameIdentifier = classNameIdentifier;
            ChangeParent(classNameIdentifier);

            SlotCount = 2;
            UpdateIsMissing();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="UvssPropertyNameSyntax"/> class.
        /// </summary>
        internal UvssPropertyNameSyntax(
            UvssIdentifierBaseSyntax attachedPropertyOwnerNameIdentifier,
            SyntaxToken periodToken,
            UvssIdentifierBaseSyntax propertyNameIdentifier)
            : base(SyntaxKind.PropertyName)
        {
            this.AttachedPropertyOwnerNameIdentifier = attachedPropertyOwnerNameIdentifier;
            ChangeParent(attachedPropertyOwnerNameIdentifier);

            this.PeriodToken = periodToken;
            ChangeParent(periodToken);

            this.PropertyNameIdentifier = propertyNameIdentifier;
            ChangeParent(propertyNameIdentifier);

            SlotCount = 3;
            UpdateIsMissing();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="UvssPropertyNameSyntax"/> class.
        /// </summary>
        internal UvssPropertyNameSyntax(
            UvssIdentifierBaseSyntax attachedPropertyOwnerNameIdentifier,
            SyntaxToken periodToken,
            UvssIdentifierBaseSyntax propertyNameIdentifier)
            : base(SyntaxKind.PropertyName)
        {
            this.AttachedPropertyOwnerNameIdentifier = attachedPropertyOwnerNameIdentifier;
            ChangeParent(attachedPropertyOwnerNameIdentifier);

            this.PeriodToken = periodToken;
            ChangeParent(periodToken);

            this.PropertyNameIdentifier = propertyNameIdentifier;
            ChangeParent(propertyNameIdentifier);

            SlotCount = 3;
            UpdateIsMissing();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="UvssEventNameSyntax"/> class.
        /// </summary>
        internal UvssEventNameSyntax(
            UvssIdentifierBaseSyntax attachedEventOwnerNameIdentifier,
            SyntaxToken periodToken,
            UvssIdentifierBaseSyntax eventNameIdentifier)
            : base(SyntaxKind.EventName)
        {
            this.AttachedEventOwnerNameIdentifier = attachedEventOwnerNameIdentifier;
            ChangeParent(attachedEventOwnerNameIdentifier);

            this.PeriodToken = periodToken;
            ChangeParent(periodToken);

            this.EventNameIdentifier = eventNameIdentifier;
            ChangeParent(eventNameIdentifier);

            SlotCount = 3;
            UpdateIsMissing();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="UvssEventNameSyntax"/> class.
        /// </summary>
        internal UvssEventNameSyntax(
            UvssIdentifierBaseSyntax attachedEventOwnerNameIdentifier,
            SyntaxToken periodToken,
            UvssIdentifierBaseSyntax eventNameIdentifier)
            : base(SyntaxKind.EventName)
        {
            this.AttachedEventOwnerNameIdentifier = attachedEventOwnerNameIdentifier;
            ChangeParent(attachedEventOwnerNameIdentifier);

            this.PeriodToken = periodToken;
            ChangeParent(periodToken);

            this.EventNameIdentifier = eventNameIdentifier;
            ChangeParent(eventNameIdentifier);

            SlotCount = 3;
            UpdateIsMissing();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="UvssAnimationKeyframeSyntax"/> class.
        /// </summary>
        internal UvssAnimationKeyframeSyntax(
            SyntaxToken keyframeKeyword,
            SyntaxToken timeToken,
            UvssIdentifierBaseSyntax easingIdentifier,
            UvssPropertyValueWithBracesSyntax value)
            : base(SyntaxKind.AnimationKeyframe)
        {
            this.KeyframeKeyword = keyframeKeyword;
            ChangeParent(keyframeKeyword);

            this.TimeToken = timeToken;
            ChangeParent(timeToken);

            this.EasingIdentifier = easingIdentifier;
            ChangeParent(easingIdentifier);

            this.Value = value;
            ChangeParent(value);

            SlotCount = 4;
            UpdateIsMissing();
        }
Example #10
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UvssAnimationKeyframeSyntax"/> class.
        /// </summary>
        internal UvssAnimationKeyframeSyntax(
            SyntaxToken keyframeKeyword,
            SyntaxToken timeToken,
            UvssIdentifierBaseSyntax easingIdentifier,
            UvssPropertyValueWithBracesSyntax value)
            : base(SyntaxKind.AnimationKeyframe)
        {
            this.KeyframeKeyword = keyframeKeyword;
            ChangeParent(keyframeKeyword);

            this.TimeToken = timeToken;
            ChangeParent(timeToken);

            this.EasingIdentifier = easingIdentifier;
            ChangeParent(easingIdentifier);

            this.Value = value;
            ChangeParent(value);

            SlotCount = 4;
            UpdateIsMissing();
        }
Example #11
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UvssStoryboardSyntax"/> class.
        /// </summary>
        internal UvssStoryboardSyntax(
            SyntaxToken atSignToken,
            UvssIdentifierBaseSyntax nameIdentifier,
            UvssIdentifierBaseSyntax loopIdentifier,
            UvssBlockSyntax body)
            : base(SyntaxKind.Storyboard)
        {
            this.AtSignToken = atSignToken;
            ChangeParent(atSignToken);

            this.NameIdentifier = nameIdentifier;
            ChangeParent(nameIdentifier);

            this.LoopIdentifier = loopIdentifier;
            ChangeParent(loopIdentifier);

            this.Body = body;
            ChangeParent(body);

            SlotCount = 4;
            UpdateIsMissing();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="UvssStoryboardSyntax"/> class.
        /// </summary>
        internal UvssStoryboardSyntax(
            SyntaxToken atSignToken,
            UvssIdentifierBaseSyntax nameIdentifier,
            UvssIdentifierBaseSyntax loopIdentifier,
            UvssBlockSyntax body)
            : base(SyntaxKind.Storyboard)
        {
            this.AtSignToken = atSignToken;
            ChangeParent(atSignToken);

            this.NameIdentifier = nameIdentifier;
            ChangeParent(nameIdentifier);

            this.LoopIdentifier = loopIdentifier;
            ChangeParent(loopIdentifier);

            this.Body = body;
            ChangeParent(body);

            SlotCount = 4;
            UpdateIsMissing();
        }
Example #13
0
        /// <summary>
        /// Adds a diagnostic indicating that a loop type is unrecognized
        /// to the specified collection of diagnostics.
        /// </summary>
        /// <param name="collection">The collection to which to add the diagnostic.</param>
        /// <param name="node">The syntax node which is associated with the diagnostic.</param>
        internal static void ReportUnrecognizedLoopType(ref ICollection<DiagnosticInfo> collection,
            UvssIdentifierBaseSyntax node)
        {
            Contract.Require(node, nameof(node));

            var span = new TextSpan(0, node.Width);
            var diagnostic = new DiagnosticInfo(node, DiagnosticID.UnrecognizedLoopType,
                DiagnosticSeverity.Error, span, $"Unrecognized loop type '{node.Text}' (should be 'none' or 'loop' or 'reverse')");

            Report(ref collection, diagnostic);
        }
Example #14
0
        /// <summary>
        /// Adds a diagnostic indicating that an easing function is unrecognized
        /// to the specified collection of diagnostics.
        /// </summary>
        /// <param name="collection">The collection to which to add the diagnostic.</param>
        /// <param name="node">The syntax node which is associated with the diagnostic.</param>
        internal static void ReportUnrecognizedEasingFunction(ref ICollection<DiagnosticInfo> collection,
            UvssIdentifierBaseSyntax node)
        {
            Contract.Require(node, nameof(node));

            var span = new TextSpan(0, node.Width);
            var diagnostic = new DiagnosticInfo(node, DiagnosticID.UnrecognizedEasingFunction,
                DiagnosticSeverity.Error, span, $"Unrecognized easing function '{node.Text}'");

            Report(ref collection, diagnostic);
        }