コード例 #1
0
        public override void Compile()
        {
            DirectFunctionCallNode node = new DirectFunctionCallNode();

            node.Parameters.Add("ClearTempVariables");

            Compiled.Add(node);
        }
コード例 #2
0
        public override void Compile()
        {
            DirectFunctionCallNode toReturn = new DirectFunctionCallNode();
            toReturn.Parameters.Add("SetReturnValue");
            toReturn.Parameters.Add(CurrentToken.Value.Text);

            Compiled.Add(toReturn);
        }
コード例 #3
0
        public static void FN(string cmd, string p1, LinkedList<ActionNode> lNode, LinkedListNode<ActionNode> before)
        {
            DirectFunctionCallNode dfn = new DirectFunctionCallNode();
            dfn.Parameters = new List<string>() { BaseCompiled.SET_GET_FROM_RTV, p1 };
            lNode.AddBefore(before, dfn);

            FunctionCallNode fn = new FunctionCallNode();
            fn.Parameters = new List<string>() { cmd, p1 };
            lNode.AddBefore(before, fn);
        }
コード例 #4
0
        public override void Compile()
        {
            DirectFunctionCallNode identifierNode = new DirectFunctionCallNode();
            identifierNode.Parameters.Add("CreateVariable");
            identifierNode.Parameters.Add(CurrentToken.Value.Text);

            DirectFunctionCallNode returnValue = new DirectFunctionCallNode();
            returnValue.Parameters.Add("SetReturnValue");
            returnValue.Parameters.Add(CurrentToken.Value.Text);
            returnValue.Parameters.Add("true");

            Compiled.Add(identifierNode);
            Compiled.Add(returnValue);
        }
コード例 #5
0
 public static void VAR(Token next, LinkedList<ActionNode> lNode, LinkedListNode<ActionNode> before)
 {
     if (next.Type == TokenType.NUMBER)
     {
         DirectFunctionCallNode dfn = new DirectFunctionCallNode();
         dfn.Parameters = new List<string>() { BaseCompiled.SET_CONST_TO_RTV, next.Text };
         lNode.AddBefore(before, dfn);
     }
     else
     {
         DirectFunctionCallNode dfnx = new DirectFunctionCallNode();
         dfnx.Parameters = new List<string>() { BaseCompiled.SET_ID_TO_RTV, next.Text };//Set the variable name
         lNode.AddBefore(before, dfnx);
     }
 }
コード例 #6
0
        public override void Compile()
        {
            string CompiledString = "";

            CurrentToken = CurrentToken.Next;
            while(CurrentToken.Value.TokenType != TokenType.STRINGOPENCLOSE)
            {
                CompiledString += " " + CurrentToken.Value.Text;

                CurrentToken = CurrentToken.Next;
            }

            CompiledString = CompiledString.Trim();

            DirectFunctionCallNode returnVariable = new DirectFunctionCallNode();
            returnVariable.Parameters.Add("SetReturnValue");
            returnVariable.Parameters.Add(CompiledString);

            Compiled.Add(returnVariable);
        }
コード例 #7
0
        public override void Compile()
        {
            var Left = CurrentToken.Previous;
            CurrentToken = CurrentToken.Next;

            while (CurrentToken.Value.TokenType != TokenType.SEMICOLUM)
            {
                var compiled = CompilerFactory.getInstance().GetCompiled(CurrentToken);
                compiled.CurrentToken = CurrentToken;
                compiled.Compile();

                CurrentToken = compiled.CurrentToken.Next;
                Compiled.InsertAfter(compiled.Compiled);
            }

            DirectFunctionCallNode assign = new DirectFunctionCallNode();
            assign.Parameters.Add("ReturnToVariable");
            assign.Parameters.Add(Left.Value.Text);

            this.Compiled.Add(assign);
        }
コード例 #8
0
 public override void Visit(DirectFunctionCallNode node)
 {
     NextNode = node.Next;
 }
コード例 #9
0
 public static void GFRTV(string id, LinkedList<ActionNode> lNode, LinkedListNode<ActionNode> before)
 {
     DirectFunctionCallNode dfn = new DirectFunctionCallNode();
     dfn.Parameters = new List<string>() { BaseCompiled.SET_GET_FROM_RTV, id };
     lNode.AddBefore(before, dfn);
 }
コード例 #10
0
 public abstract void Visit(DirectFunctionCallNode directFunctionCall);