Terminal comma causes argument to be ignored.

18 views
Skip to first unread message

John P Charlesworth

unread,
Jan 17, 2014, 1:14:41 PM1/17/14
to rap...@googlegroups.com
Here's a simple example:

def app($prop):
    tr:
        td:
            $prop

app('year,')

Compiling this with RapydML produces this error:

Error in mltest.pyml: line 6: Method 'app' expects 1 attributes, 0 given.

When the comma after year is removed, the file correctly compiles to

<tr>
    <td>
        year
    </td>
</tr>



Alexander Tsepkov

unread,
Jan 18, 2014, 2:01:55 AM1/18/14
to John P Charlesworth, rap...@googlegroups.com
I'll take a look at this to see if this is something easily-fixable. RapydML compiler is kinda wonky, since it's regex-based and lacks a proper tokenizer. I was considering rewriting it using RapydScript's core, which would solve issues like this once and for all, but that could be time-consuming.

Alexander Tsepkov

unread,
Jan 18, 2014, 2:20:06 AM1/18/14
to John P Charlesworth, rap...@googlegroups.com
Fixed, issue was with lagging comma confusing the parser into existing the argument parsing loop without appending the variable it parsed to the stack.

John P Charlesworth

unread,
Jan 19, 2014, 1:35:51 PM1/19/14
to rap...@googlegroups.com
Many thanks, it's working for me.
I find RapydML very useful because I tend to have pretty complex html files; I would be strongly in favour of a rewrite, if you ever find the time!
Reply all
Reply to author
Forward
0 new messages