val helper function
This commit is contained in:
		| @@ -459,6 +459,16 @@ function parser:saveas(prev, name, sel) | ||||
|  self[name] = sel and prev[sel] or prev | ||||
| end | ||||
|  | ||||
| -- returns its args, ignoring | ||||
| -- prev. Used to stuff things | ||||
| -- into prev. args are packed | ||||
| -- if there's multiple. | ||||
| function parser:val(_, ...) | ||||
|  local ret := pack(...) | ||||
|  if (#ret == 1) return ret[1] | ||||
|  return ret | ||||
| end | ||||
|  | ||||
| -->8 | ||||
| --ship behavior | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user