public void Visit(FSlashNode node)
        {
            var right = Nodes.Pop();
            var left  = Nodes.Pop();

            Nodes.Push(new FSlashNode(left, right));
        }
Exemplo n.º 2
0
 public void Visit(FSlashNode node)
 {
 }
 public void Visit(FSlashNode node)
 {
     node.Left.Accept(this);
     node.Right.Accept(this);
     node.Accept(_visitor);
 }
Exemplo n.º 4
0
 public override void Visit(FSlashNode node)
 {
     ReportReturnTypesAreNotSame(node, "Divide");
 }
Exemplo n.º 5
0
 public override void Visit(FSlashNode node) => ProduceDebuggerInstructions(node, n => base.Visit(n));
Exemplo n.º 6
0
 /// <summary>
 ///     Visit FSlash node.
 /// </summary>
 /// <param name="node">FSlash node of AST</param>
 public abstract void Visit(FSlashNode node);
Exemplo n.º 7
0
 /// <summary>
 ///     Performs "FSlash" specific operations.
 /// </summary>
 /// <param name="node">The "FSlash" node.</param>
 public virtual void Visit(FSlashNode node)
 {
     Instructions.Add(new DivideNumeric());
 }
Exemplo n.º 8
0
        private RdlSyntaxNode ComposeArithmeticOperators(Precendence precendence)
        {
            RdlSyntaxNode node = null;

            switch (precendence)
            {
            case Precendence.Level1:
            {
                node = ComposeArithmeticOperators(Precendence.Level2);
                while (IsArithmeticOperator(Current, Precendence.Level1))
                {
                    switch (Current.TokenType)
                    {
                    case StatementType.Star:
                        Consume(StatementType.Star);
                        node = new StarNode(node, ComposeBaseTypes());
                        break;

                    case StatementType.FSlash:
                        Consume(StatementType.FSlash);
                        node = new FSlashNode(node, ComposeBaseTypes());
                        break;

                    case StatementType.Mod:
                        Consume(StatementType.Mod);
                        node = new ModuloNode(node, ComposeBaseTypes());
                        break;

                    case StatementType.In:
                        Consume(StatementType.In);
                        node = new InNode(node, ComposeArgs());
                        break;

                    case StatementType.NotIn:
                        Consume(StatementType.NotIn);
                        node = new NotInNode(node, ComposeArgs());
                        break;
                    }
                }
                break;
            }

            case Precendence.Level2:
            {
                node = ComposeArithmeticOperators(Precendence.Level3);
                while (IsArithmeticOperator(Current, Precendence.Level2))
                {
                    switch (Current.TokenType)
                    {
                    case StatementType.Plus:
                        Consume(StatementType.Plus);
                        node = new AddNode(node, ComposeBaseTypes());
                        break;

                    case StatementType.Hyphen:
                        Consume(StatementType.Hyphen);
                        node = new HyphenNode(node, ComposeBaseTypes());
                        break;
                    }
                }
                break;
            }

            case Precendence.Level3:
                node = ComposeBaseTypes();
                break;
            }
            return(node);
        }