Greetings,<br><br>I'm trying to re-purpose the lib2to3 module and along the way came up with this pattern:<br><br>"funcdef<'def' name=NAME parameters ['->' test] ':' suite=suite>"<br>
<br>It seems to have 2 problems:<br><ol><li>Single-line defs are not matched. Eg: "def singleLineFunc(): return 1 + 2" is not matched, but "def multiLineFunc():\n a = 1 + 2\n return a" is matched.</li>
<li>The first multi-line function in a file is matched twice (eg, the same node, results pair is passed to the transform method.<br></li></ol>Why are these happening? If anyone could point me to a general discussion about creating these would be most helpful. I haven't found a lot of resources for these and investigating has been more of a struggle than usual.<br>
<br>Thanks,<br><br>--<br clear="all">Zachary Burns<br>(407)590-4814<br>Aim - Zac256FL<br>Production Engineer (Digital Overlord)<br>Zindagi Games<br>