public void Visit(FuncCallParamsNode n) { var children = n.GetChildren(); ITable statementsSymTable; ASTNodeBase currentNode = n; while (!(currentNode is StatementsNode)) { currentNode = currentNode.ParentNode; if (currentNode == null) { throw new Exception("StatementsNode is somehow not a distant parent of this node..."); } } statementsSymTable = currentNode.SymTable; foreach (var node in children) { node.SymTable = statementsSymTable; node.Accept(this); } foreach (var child in children) { n.ParamsTypes.Add(child.ExprType); } }
public CodeGen(ASTNodeBase astTree, GlobalSymbolTable globalSymbolTable, CodeWriter codeStream) { _astTree = astTree; _globalSymbolTable = globalSymbolTable; _writer = codeStream; _sizeCalculator = new SizeCalculator(_astTree, _globalSymbolTable); }
public SizeCalculator(ASTNodeBase astTree, GlobalSymbolTable globalSymbolTable) { _astTree = astTree; _globalSymbolTable = globalSymbolTable; }
public Sequence(ASTNodeBase leftNode, Sequence sequence) : base(leftNode, sequence) { }
protected ASTNodeBase(ASTNodeBase leftNode, ASTNodeBase rightNode) { _leftNode = leftNode; _rightNode = rightNode; }
private void PrintDOTParentChild(ASTNodeBase node) { var parent = node.ParentNode; _stream.WriteLine($"{parent.ID} -> {node.ID}"); }
private void PrintDOTIDLabel(ASTNodeBase node, string data) { var stringifiedType = TypePrintUtils.StringifyType(node.GetType()); _stream.WriteLine($"{node.ID}[label=\"{node.ID}:{stringifiedType}\\n{data}\"]"); }
internal CAMLWhere(ASTNodeBase leftNode) : base(leftNode) { }
//internal Where(ASTNodeBase leftNode, ASTNodeBase rightNode) // : base(leftNode, rightNode) //{ //} internal Where(ASTNodeBase leftNode) : base(leftNode, null) { }