什么症状要查心肌酶| 牡丹什么时候开放| 21年是什么生肖年| 控制欲强的人最怕什么| 日落胭脂红的下一句是什么| 宽慰是什么意思| 伏羲和女娲是什么关系| dhea是什么| 唐氏筛查和无创有什么区别| 姓陈取什么名字好听| 高筋面粉和低筋面粉有什么区别| 左侧卵巢囊性结构什么意思| 止吐吃什么药| 不老实是什么意思| 8月20号什么星座| 80年属猴的是什么命| 卡介疫苗是预防什么的| 现在创业做什么好| 感冒了吃什么水果好| 阴虚内热吃什么中成药| 2013年五行属什么| 开除是什么意思| 中午吃什么| 登对是什么意思| 送葬后回家注意什么| 牛肉不能和什么水果一起吃| 骨折什么感觉| 胸痛挂什么科| 红薯什么季节成熟| 肠息肉是什么症状| 烟酒不沾的人什么性格| 星星像什么比喻句| 漫反射是什么意思| 你掀起波澜抛弃了我是什么歌| 腿上的肉疼是什么原因| 2017什么年| 大什么世界| 巴宝莉属于什么档次| 脚肿吃什么消肿最快| 甲钴胺治什么病| 维生素d3和d2有什么区别| 鳕鱼不能和什么一起吃| 嗓子肿痛吃什么药| 翡翠和玉有什么区别| 月经来的少是什么原因| 梦见长白头发是什么意思| 睾丸扭转有什么症状| 禁令是什么意思| 生力军什么意思| 子鼠是什么意思| 53岁属什么| 女生安全期是什么意思| 2月21日什么星座| 佝偻病是什么样子图片| 黄皮什么时候上市| 拉烂屎是什么原因| 吃什么食物补肾| 眼睛看东西变形扭曲是什么原因| 口腔白斑是什么病| 云的五行属性是什么| 最小的单位是什么| 梦到自己掉头发是什么预兆| mon什么意思| 尾巴骨疼挂什么科| 百香果有什么功效与作用| m什么意思| 土豆淀粉能做什么美食| 阴道炎用什么栓剂| 柿子不能跟什么一起吃| otg线是什么| 黄瓜籽粉有什么作用| 反复高烧是什么原因| 佛手柑是什么| 手指腱鞘炎是什么原因造成的| 节制的意思是什么| 死而什么什么| hk什么意思| 胡萝卜富含什么维生素| 鼻烟是什么| 咏柳中的咏是什么意思| 白羊座上升星座是什么| 什么是切片| 日本有什么好玩的| 漫山遍野是什么意思| 妙赞是什么意思| 天明是什么意思| 中性粒细胞低吃什么药| 乙肝病毒核心抗体阳性是什么意思| 陈皮有什么功效作用| 反流性咽喉炎吃什么药最好| 劲爆是什么意思| 反刍是什么意思| 头晕吃什么药好| 西游记是一部什么小说| 头晕想吐是什么症状| 橡皮擦是什么材料做的| 梦见被追杀是什么预兆| 腌肉放什么调料| 伊维菌素是什么药| 荆棘什么意思| 收割是什么意思| 6月6日什么星座| 早上睡不醒是什么原因| 血清谷丙转氨酶偏高是什么意思| 息斯敏是什么药| 黄钻有什么用| 我用什么才能留住你| 有痰咳嗽吃什么药| 冷都男是什么意思| 生吃蛇胆有什么功效| 早餐吃什么营养又健康| 天津卫的卫是什么意思| 心率低吃什么药好| 什么品牌蓝牙耳机好| 山药不能和什么一起吃| 水银是什么东西| 鱼腥草破壁饮片有什么功效| 面包糠是什么做的| 女人卵巢保养吃什么好| 怀孕了不能吃什么| 挺拔的意思是什么| 爻辞是什么意思| 睡眠不好会引起什么症状| 血管检查是做什么检查| 夏吃姜有什么好处| 乌江鱼是什么鱼| 发质硬适合什么发型| 雾灯什么时候开| may是什么意思| 回流是什么意思| 1972年五行属什么| 十一月一日是什么星座| 黄瓜敷脸有什么好处| 四个又念什么| 荨麻疹是什么引起| 尿液红细胞高是什么原因| 血糖可以吃什么水果| 无花果什么品种最好吃| 地动山摇是什么生肖| 尿不净是什么原因| 手术刀口吃什么愈合快| 厚黑学的精髓是什么| 法图麦在回族什么意思| 什么是夜店| 口甜是什么原因引起的| elaine是什么意思| 为什么辰不能见亥| 食管息肉的症状是什么| 檀木手串有什么好处| 当家作主是什么生肖| 窦性心律不齐是什么原因引起的| 阴道痒吃什么药| 光感是什么意思| 肠胃不好挂什么科| 脑梗怎么形成的原因是什么| 貉是什么动物| 圈名什么意思| 前列腺用什么药| 缠腰蛇是什么原因引起的| 春是什么生肖| 六八年属什么| 什么是沙眼| 小孩吃什么水果好| 鼻烟是什么东西| 什么叫活检| 王晶为什么不娶邱淑贞| 120是什么意思| 两个脚脖子肿什么原因| 白细胞酯酶弱阳性是什么意思| 肚脐下三寸是什么位置| 孕妇吃坚果对胎儿有什么好处| 什么样的月光| 为什么夏天| 什么情况下要打破伤风针| 菲薄是什么意思| 吊兰开花有什么兆头| 35岁月经量少是什么原因| 呼吸机vt代表什么| 舒俱来是什么宝石| 波子是什么车| 5月9号是什么星座| alba手表是什么牌子| 莲叶和荷叶有什么区别| 墨西哥说什么语言| 惊蛰是什么季节| 身经百战是什么意思| 阴吹是什么意思| 为什么第一次没有出血| 寒天是什么| 吃什么能去湿气| 吃什么能降血压最有效| 长孙皇后为什么叫观音婢| 什么人不能吃狗肉| gap什么意思| 孙悟空姓什么| 8月8号是什么日子| 什么的母鸡| 什么是天珠| 牛油果对身体有什么好处| 万象更新是什么生肖| 涌泉穴在什么位置| 诛心是什么意思| mico是什么意思| 女性肾虚吃什么补最好最快| 1988属什么生肖| 水泡长什么样子图片| 筋是什么组织| 肛门上长了个肉疙瘩是什么原因| 经常拉肚子挂什么科| 什么山什么水| 一什么牌子| 经常放屁吃什么药| 新疆是什么地貌| 婚检是什么| 鼻涕臭是什么原因| 一个月来两次月经是什么原因| 塞肛门的止痛药叫什么| 梦见家里发大水了是什么征兆| 朱元璋为什么杀徐达| 猫在风水上代表什么| 什么是焦虑症| 脑出血挂什么科| 蒙古族的那达慕大会是在什么时候| 胆红素阴性是什么意思| 白领是什么职业| 痔疮可以吃什么| 如法炮制是什么意思| 驻马店以前叫什么名字| 船舷是什么意思| 十一点半是什么时辰| 7月30日是什么日子| 梦见别人死了是什么预兆| 西洋参有什么功效| 五什么六什么的成语| 佛法的真谛是什么| 铁锈用什么能洗掉| ii是什么意思| 指甲长得快是什么原因| 伤风败俗是什么意思| 青龙白虎是什么意思| 贻字五行属什么| 身主天相是什么意思| 3d打印是什么意思| 补钾吃什么药| 汤姆猫是什么品种| 五花大绑是什么意思| 捻子泡酒有什么功效| 大水冲了龙王庙什么意思| 什么是性冷淡| 彪悍是什么意思| 广谱是什么意思| 什么是屈光不正| 小便疼吃什么药| 龟头流脓小便刺痛吃什么药| 物以类聚人以群分什么意思| 活动性胃炎是什么意思| 花呗是什么意思| 下面外面瘙痒用什么药| 吃什么对肺部好| 晚霞是什么| 人流后吃什么好| 移民瑞士需要什么条件| 涤纶是什么布料| 右附件区囊肿是什么意思| 百度???? ??

桃江四中78名患结核学生报名高考 能否顺利体检?

????, ?? ??? ????.

-- This module provides easy processing of arguments passed to Scribunto from
-- #invoke. It is intended for use by other Lua modules, and should not be
-- called from #invoke directly.

local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType

local arguments = {}

-- Generate four different tidyVal functions, so that we don't have to check the
-- options every time we call it.

local function tidyValDefault(key, val)
	if type(val) == 'string' then
		val = val:match('^%s*(.-)%s*$')
		if val == '' then
			return nil
		else
			return val
		end
	else
		return val
	end
end

local function tidyValTrimOnly(key, val)
	if type(val) == 'string' then
		return val:match('^%s*(.-)%s*$')
	else
		return val
	end
end

local function tidyValRemoveBlanksOnly(key, val)
	if type(val) == 'string' then
		if val:find('%S') then
			return val
		else
			return nil
		end
	else
		return val
	end
end

local function tidyValNoChange(key, val)
	return val
end

local function matchesTitle(given, title)
	local tp = type( given )
	return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title
end

local translate_mt = { __index = function(t, k) return k end }

function arguments.getArgs(frame, options)
	checkType('getArgs', 1, frame, 'table', true)
	checkType('getArgs', 2, options, 'table', true)
	frame = frame or {}
	options = options or {}

	--[[
	-- Set up argument translation.
	--]]
	options.translate = options.translate or {}
	if getmetatable(options.translate) == nil then
		setmetatable(options.translate, translate_mt)
	end
	if options.backtranslate == nil then
		options.backtranslate = {}
		for k,v in pairs(options.translate) do
			options.backtranslate[v] = k
		end
	end
	if options.backtranslate and getmetatable(options.backtranslate) == nil then
		setmetatable(options.backtranslate, {
			__index = function(t, k)
				if options.translate[k] ~= k then
					return nil
				else
					return k
				end
			end
		})
	end

	--[[
	-- Get the argument tables. If we were passed a valid frame object, get the
	-- frame arguments (fargs) and the parent frame arguments (pargs), depending
	-- on the options set and on the parent frame's availability. If we weren't
	-- passed a valid frame object, we are being called from another Lua module
	-- or from the debug console, so assume that we were passed a table of args
	-- directly, and assign it to a new variable (luaArgs).
	--]]
	local fargs, pargs, luaArgs
	if type(frame.args) == 'table' and type(frame.getParent) == 'function' then
		if options.wrappers then
			--[[
			-- The wrappers option makes Module:Arguments look up arguments in
			-- either the frame argument table or the parent argument table, but
			-- not both. This means that users can use either the #invoke syntax
			-- or a wrapper template without the loss of performance associated
			-- with looking arguments up in both the frame and the parent frame.
			-- Module:Arguments will look up arguments in the parent frame
			-- if it finds the parent frame's title in options.wrapper;
			-- otherwise it will look up arguments in the frame object passed
			-- to getArgs.
			--]]
			local parent = frame:getParent()
			if not parent then
				fargs = frame.args
			else
				local title = parent:getTitle():gsub('/???$', '')
				local found = false
				if matchesTitle(options.wrappers, title) then
					found = true
				elseif type(options.wrappers) == 'table' then
					for _,v in pairs(options.wrappers) do
						if matchesTitle(v, title) then
							found = true
							break
						end
					end
				end

				-- We test for false specifically here so that nil (the default) acts like true.
				if found or options.frameOnly == false then
					pargs = parent.args
				end
				if not found or options.parentOnly == false then
					fargs = frame.args
				end
			end
		else
			-- options.wrapper isn't set, so check the other options.
			if not options.parentOnly then
				fargs = frame.args
			end
			if not options.frameOnly then
				local parent = frame:getParent()
				pargs = parent and parent.args or nil
			end
		end
		if options.parentFirst then
			fargs, pargs = pargs, fargs
		end
	else
		luaArgs = frame
	end

	-- Set the order of precedence of the argument tables. If the variables are
	-- nil, nothing will be added to the table, which is how we avoid clashes
	-- between the frame/parent args and the Lua args.
	local argTables = {fargs}
	argTables[#argTables + 1] = pargs
	argTables[#argTables + 1] = luaArgs

	--[[
	-- Generate the tidyVal function. If it has been specified by the user, we
	-- use that; if not, we choose one of four functions depending on the
	-- options chosen. This is so that we don't have to call the options table
	-- every time the function is called.
	--]]
	local tidyVal = options.valueFunc
	if tidyVal then
		if type(tidyVal) ~= 'function' then
			error(
				"bad value assigned to option 'valueFunc'"
					.. '(function expected, got '
					.. type(tidyVal)
					.. ')',
				2
			)
		end
	elseif options.trim ~= false then
		if options.removeBlanks ~= false then
			tidyVal = tidyValDefault
		else
			tidyVal = tidyValTrimOnly
		end
	else
		if options.removeBlanks ~= false then
			tidyVal = tidyValRemoveBlanksOnly
		else
			tidyVal = tidyValNoChange
		end
	end

	--[[
	-- Set up the args, metaArgs and nilArgs tables. args will be the one
	-- accessed from functions, and metaArgs will hold the actual arguments. Nil
	-- arguments are memoized in nilArgs, and the metatable connects all of them
	-- together.
	--]]
	local args, metaArgs, nilArgs, metatable = {}, {}, {}, {}
	setmetatable(args, metatable)

	local function mergeArgs(tables)
		--[[
		-- Accepts multiple tables as input and merges their keys and values
		-- into one table. If a value is already present it is not overwritten;
		-- tables listed earlier have precedence. We are also memoizing nil
		-- values, which can be overwritten if they are 's' (soft).
		--]]
		for _, t in ipairs(tables) do
			for key, val in pairs(t) do
				if metaArgs[key] == nil and nilArgs[key] ~= 'h' then
					local tidiedVal = tidyVal(key, val)
					if tidiedVal == nil then
						nilArgs[key] = 's'
					else
						metaArgs[key] = tidiedVal
					end
				end
			end
		end
	end

	--[[
	-- Define metatable behaviour. Arguments are memoized in the metaArgs table,
	-- and are only fetched from the argument tables once. Fetching arguments
	-- from the argument tables is the most resource-intensive step in this
	-- module, so we try and avoid it where possible. For this reason, nil
	-- arguments are also memoized, in the nilArgs table. Also, we keep a record
	-- in the metatable of when pairs and ipairs have been called, so we do not
	-- run pairs and ipairs on the argument tables more than once. We also do
	-- not run ipairs on fargs and pargs if pairs has already been run, as all
	-- the arguments will already have been copied over.
	--]]

	metatable.__index = function (t, key)
		--[[
		-- Fetches an argument when the args table is indexed. First we check
		-- to see if the value is memoized, and if not we try and fetch it from
		-- the argument tables. When we check memoization, we need to check
		-- metaArgs before nilArgs, as both can be non-nil at the same time.
		-- If the argument is not present in metaArgs, we also check whether
		-- pairs has been run yet. If pairs has already been run, we return nil.
		-- This is because all the arguments will have already been copied into
		-- metaArgs by the mergeArgs function, meaning that any other arguments
		-- must be nil.
		--]]
		if type(key) == 'string' then
			key = options.translate[key]
		end
		local val = metaArgs[key]
		if val ~= nil then
			return val
		elseif metatable.donePairs or nilArgs[key] then
			return nil
		end
		for _, argTable in ipairs(argTables) do
			local argTableVal = tidyVal(key, argTable[key])
			if argTableVal ~= nil then
				metaArgs[key] = argTableVal
				return argTableVal
			end
		end
		nilArgs[key] = 'h'
		return nil
	end

	metatable.__newindex = function (t, key, val)
		-- This function is called when a module tries to add a new value to the
		-- args table, or tries to change an existing value.
		if type(key) == 'string' then
			key = options.translate[key]
		end
		if options.readOnly then
			error(
				'could not write to argument table key "'
					.. tostring(key)
					.. '"; the table is read-only',
				2
			)
		elseif options.noOverwrite and args[key] ~= nil then
			error(
				'could not write to argument table key "'
					.. tostring(key)
					.. '"; overwriting existing arguments is not permitted',
				2
			)
		elseif val == nil then
			--[[
			-- If the argument is to be overwritten with nil, we need to erase
			-- the value in metaArgs, so that __index, __pairs and __ipairs do
			-- not use a previous existing value, if present; and we also need
			-- to memoize the nil in nilArgs, so that the value isn't looked
			-- up in the argument tables if it is accessed again.
			--]]
			metaArgs[key] = nil
			nilArgs[key] = 'h'
		else
			metaArgs[key] = val
		end
	end

	local function translatenext(invariant)
		local k, v = next(invariant.t, invariant.k)
		invariant.k = k
		if k == nil then
			return nil
		elseif type(k) ~= 'string' or not options.backtranslate then
			return k, v
		else
			local backtranslate = options.backtranslate[k]
			if backtranslate == nil then
				-- Skip this one. This is a tail call, so this won't cause stack overflow
				return translatenext(invariant)
			else
				return backtranslate, v
			end
		end
	end

	metatable.__pairs = function ()
		-- Called when pairs is run on the args table.
		if not metatable.donePairs then
			mergeArgs(argTables)
			metatable.donePairs = true
		end
		return translatenext, { t = metaArgs }
	end

	local function inext(t, i)
		-- This uses our __index metamethod
		local v = t[i + 1]
		if v ~= nil then
			return i + 1, v
		end
	end

	metatable.__ipairs = function (t)
		-- Called when ipairs is run on the args table.
		return inext, t, 0
	end

	return args
end

return arguments
眼花缭乱什么意思 脸发麻是什么原因 打了鸡血是什么意思 阳贵是什么意思 胃溃疡吃什么药好得快
威士忌是什么酒 印度为什么叫三哥 人五人六是什么意思 兰花指什么生肖 中药一般什么时候喝最好
9价疫苗适合什么年龄人打 37岁属什么的生肖 酱瓜是什么瓜 he是什么气体 眼睫毛脱落是什么原因
外痔长什么样 财评是什么意思 腋毛变白是什么原因 什么猫最好养 为什么会有湿气
沙僧是什么动物xianpinbao.com 反胃恶心想吐吃什么药hcv8jop9ns8r.cn 拉直和软化有什么区别hcv9jop5ns1r.cn 群青色是什么颜色hcv7jop7ns1r.cn 梦见过生日是什么意思hcv7jop5ns1r.cn
一什么玉米hcv7jop7ns1r.cn 什么是肺磨玻璃结节baiqunet.com 递增是什么意思hcv8jop0ns7r.cn ivf是什么意思mmeoe.com 斑点狗是什么品种hcv8jop7ns7r.cn
背靠背是什么牌子hcv8jop6ns4r.cn 12月16是什么星座hcv8jop9ns3r.cn 恭送是什么意思hcv7jop9ns2r.cn 命途多舛是什么意思hcv9jop1ns5r.cn 兆字五行属什么hcv7jop9ns1r.cn
剑桥英语和新概念英语有什么区别hcv8jop8ns7r.cn 乘的部首是什么cj623037.com 长期喝奶粉有什么好处hcv8jop5ns9r.cn 尿痛是什么原因hcv8jop4ns3r.cn 1983属什么生肖hcv9jop5ns3r.cn
百度