Пример #1
0
 public void Visit(FuncCallNode n)
 {
     PrintDOTIDLabel(n);
     PrintDOTParentChild(n);
     foreach (var child in n.GetChildren())
     {
         child.Accept(this);
     }
 }
Пример #2
0
        public void Visit(FuncCallNode n)
        {
            var children = n.GetChildren();

            foreach (var child in children)
            {
                child.SymTable = n.SymTable;
                child.Accept(this);
            }
        }
        public void Visit(FuncCallNode n)
        {
            var table = (FunctionSymbolTableEntry)n.SymTable;

            n._CallchainAddressVarName = table.MemoryLayout.AddTemporaryVariable();

            var children = n.GetChildren();

            foreach (var child in children)
            {
                child.Accept(this);
            }
        }
Пример #4
0
        public void Visit(FuncCallNode n)
        {
            var children = n.GetChildren();

            var first = children.First();

            first.SymTable          = n.SymTable;
            first.SecondarySymTable = n.SymTable;
            first.CallerTable       = n.SymTable;
            first.Accept(this);

            var currentScopeSpec = first.ScopeSpec;

            foreach (var node in children.Skip(1))
            {
                if (string.IsNullOrEmpty(currentScopeSpec))
                {
                    _errorStream.WriteLine($"ASSERT: Use of variable with no scopespec.");
                    Console.WriteLine($"ASSERT: Use of variable with no scopespec.");
                    break;
                }

                var classTable = _globalTable.GetClassSymbolTableByName(currentScopeSpec);
                if (classTable == null)
                {
                    _errorStream.WriteLine($"ScopeSpec \"{currentScopeSpec}\" refers to a non existing class.");
                    Console.WriteLine($"Error: ScopeSpec \"{currentScopeSpec}\" refers to a non existing class.");
                    break;
                }

                node.SymTable          = classTable;
                node.SecondarySymTable = n.SymTable;
                node.CallerTable       = n.SymTable;
                node.Accept(this);
                currentScopeSpec = node.ScopeSpec;
            }
        }
Пример #5
0
        public void Visit(FuncCallNode n)
        {
            var children = n.GetChildren();

            WriteCallchainCode(children, FSPReg);
        }