blockNames.add(blockName);
interpreter.assignRuntimeScope(BLOCKNAMES, blockNames, 1);
}
Object isChild = interpreter.fetchRuntimeScope(JangodInterpreter.CHILD_FLAG, 1);
if ( isChild != null ) {
ListOrderedMap blockList = (ListOrderedMap) interpreter.fetchRuntimeScope(JangodInterpreter.BLOCK_LIST, 1);
//check block was defined in parent
if ( ! blockList.containsKey(blockName) ) {
throw new InterpretException("Dosen't define block in extends parent with name >>> " + blockName);
}
//cover parent block content with child's.
blockList.put(blockName, getBlockContent(carries, interpreter));
return "";
}
Object isParent = interpreter.fetchRuntimeScope(JangodInterpreter.PARENT_FLAG, 1);
if ( isParent != null) {
//save block content to engine, and return identify
ListOrderedMap blockList = (ListOrderedMap) interpreter.fetchRuntimeScope(JangodInterpreter.BLOCK_LIST, 1);
blockList.put(blockName, getBlockContent(carries, interpreter));
return JangodInterpreter.SEMI_BLOCK + blockName;
}
return getBlockContent(carries, interpreter);
}