/** Get or create a FieldBuffer for a Field. */ public FieldBuffer getFieldBuffer(IField field) { assert field.getTable() == this.table; FieldBuffer ret = fieldBuffers.get(field); if (ret != null) return ret; ret = new FieldBuffer(this.getScope(), this, field); fieldBuffers.put(field, ret); return ret; }
/** Get or create a FieldBuffer for a Field. */ public FieldBuffer getFieldBuffer(IField field) { assert field.getTable() == this.table; FieldBuffer ret = fieldBuffers.get(field); if (ret != null) return ret; ret = new FieldBuffer(this.getScope(), this, field); fieldBuffers.put(field, ret); return ret; }
/** Can a buffer reference be scoped to this block? */ private boolean canScopeBufferReference(TableBuffer symbol) { // REPEAT, FOR, and Program_root blocks can scope a buffer. switch (blockStatementNode.getType()) { case ProParserTokenTypes.REPEAT: case ProParserTokenTypes.FOR: case ProParserTokenTypes.Program_root: return true; } // If this is the root block for the buffer's symbol, then the scope // cannot be any higher. if (symbol.getScope().getRootBlock() == this) return true; return false; } // canScopeBufferReference
/** Can a buffer reference be scoped to this block? */ private boolean canScopeBufferReference(TableBuffer symbol) { // REPEAT, FOR, and Program_root blocks can scope a buffer. switch (blockStatementNode.getType()) { case ProParserTokenTypes.REPEAT: case ProParserTokenTypes.FOR: case ProParserTokenTypes.Program_root: return true; } // If this is the root block for the buffer's symbol, then the scope // cannot be any higher. if (symbol.getScope().getRootBlock() == this) return true; return false; } // canScopeBufferReference
/** * Add a reference to a BufferScope to this and all outer blocks. These references are required for duplicating * Progress's scope and "raise scope" behaviours. BufferScope references are not added up past the symbol's scope. */ public void addBufferScopeReferences(BufferScope bufferScope) { // References do not get added to DO blocks. if (blockStatementNode.getNodeType() != ABLNodeType.DO) bufferScopes.add(bufferScope); if (parent != null && bufferScope.getSymbol().getScope().getRootBlock() != this) { parent.addBufferScopeReferences(bufferScope); } }
/** * Add a reference to a BufferScope to this and all outer blocks. These references are required for duplicating * Progress's scope and "raise scope" behaviours. BufferScope references are not added up past the symbol's scope. */ public void addBufferScopeReferences(BufferScope bufferScope) { // References do not get added to DO blocks. if (blockStatementNode.getNodeType() != ABLNodeType.DO) bufferScopes.add(bufferScope); if (parent != null && bufferScope.getSymbol().getScope().getRootBlock() != this) { parent.addBufferScopeReferences(bufferScope); } }
/** Find nearest BufferScope for a BufferSymbol, if any */ private BufferScope findBufferScope(TableBuffer symbol) { for (BufferScope buff : bufferScopes) { if (buff.getSymbol() != symbol) continue; if (buff.getBlock() == this) return buff; } if (parent != null && symbol.getScope().getRootBlock() != this) return parent.findBufferScope(symbol); return null; }
/** Find nearest BufferScope for a BufferSymbol, if any */ private BufferScope findBufferScope(TableBuffer symbol) { for (BufferScope buff : bufferScopes) { if (buff.getSymbol() != symbol) continue; if (buff.getBlock() == this) return buff; } if (parent != null && symbol.getScope().getRootBlock() != this) return parent.findBufferScope(symbol); return null; }
private BufferScope getBufferScopeSub(TableBuffer symbol, BufferScope.Strength creating) { if (parent != null && symbol.getScope().getRootBlock() != this) { BufferScope buff = parent.getBufferScopeSub(symbol, creating); if (buff != null)
private BufferScope getBufferScopeSub(TableBuffer symbol, BufferScope.Strength creating) { if (parent != null && symbol.getScope().getRootBlock() != this) { BufferScope buff = parent.getBufferScopeSub(symbol, creating); if (buff != null)