title: lua - get the list of parameter names of a function, from outside the function
body: <p>I'm generating some (non-html) documentation for a Lua library that I developed. I will generate the documentation by hand, but I'd appreciate some kind of automation if possible (i.e. generating skeletons for each function so I can fill them in)</p>
  
  <p>I'd like to know if there's a way for lua to know the names of the parameters that a function takes, from outside it.</p>
  
  <p>For example, is there a way to do this in Lua?</p>
  
  <pre><code>function foo(x,y)
    ... -- any code here
  end
  
  print( something ... foo ... something)
  -- expected output: "x", "y"
  </code></pre>
  
  <p>Thanks a lot.</p>