@Override
	public void visitImport(XTreeImport _import) {
		XCodeGen code = getCode(_import);
		for (XTreeImportEntry importEntry : _import.imports) {
			String importName = importEntry._import.name;
			XTreeIdent name = importEntry.as == null ? importEntry._import : importEntry.as;
			String asName = name.name;
			int index = asName.indexOf('.');
			if (index != -1) {
				name = new XTreeIdent(name.position, asName.substring(0, index));
			}
			XCompiledPart parts = new XCompiledPartVar(importEntry, scope, name, this.scope.isGloabl() ? XVarAccess.GLOBAL : XVarAccess.LOCAL);
			parts.setup(this, code);
			code.addInstruction(importEntry, XOpcode.IMPORT, importName);
			if (importEntry.as != null)
				importName = importEntry.as.name;
			if (index == -1) {
				parts.set(this, code);
				code.addInstruction(importEntry, XOpcode.POP_1);
			} else {
				parts.get(this, code);
				code.addInstruction(importEntry, XOpcode.DUP);
				code.addInstruction(importEntry, XOpcode.LOADN);
				code.addInstruction(importEntry, XOpcode.SAME);
				XJumpTarget target = new XJumpTarget();
				code.addInstruction(importEntry, XOpcode.JUMP_IF_ZERO, target);
				code.addInstruction(importEntry, XOpcode.POP_1);
				code.addInstruction(importEntry, XOpcode.MAKE_MAP, 0);
				parts.set(this, code);
				code.addInstruction(importEntry, target);
				code.addInstruction(importEntry, XOpcode.IMPORT_SAVE, asName.substring(index + 1));
			}
		}
	}