The follow code is trying simply to print the first argument of a macro. I've tried various things found on the net(there is very little) to get #1 printed in lua but nothing works. I assume there is an issue with interpreting it in lua. Would be nice if there was some tutorial on bridging the gap between tex and lua. Most stuff I've seen use external lua files or do not reference anything except macros in a directlua block.
\documentclass[11pt]{book} % use larger type; default would be 10pt
\usepackage{luatex}
\usepackage{pgffor}
\tracingonline 6
\directlua{
tex.enableprimitives('',tex.extraprimitives())
local lpeg = require "lpeg"
}
\begin{document}
\def\Parse#1{
\directlua{
cmdString = tostring(#1)
tex.print(cmdString)
}
}
\Parse{hello12341234asdf}
\end{document}