Skip to content

Commit

Permalink
separate case in winxed translator to handle parent-less classes
Browse files Browse the repository at this point in the history
  • Loading branch information
plobsing committed Jan 9, 2011
1 parent 27b9e2c commit ffb3ef4
Show file tree
Hide file tree
Showing 2 changed files with 1,331 additions and 1,267 deletions.
3 changes: 2 additions & 1 deletion bootstrap/winxed-compiler.dual
Expand Up @@ -222,7 +222,8 @@ ometa WinxedTranslator {
anonfunc :args curlyTrans:body -> ('(function (' + JOIN(args, ',') + ')' + string(body) + ')'),
funcdecl :name UNDEF :args curlyTrans:body -> ('function ' + string(name) + '(' + JOIN(args, ',') + ')' + string(body)),
funcdecl :name trans:flags :args curlyTrans:body -> ('function ' + string(name) + '[' + string(flags) + '](' + JOIN(args, ',') + ')' + string(body)),
classdecl :name :bases curlyTrans:body -> ('class ' + string(name) + (STRLEN(bases) > 0 ? ':' + JOIN(bases, ',') : '') + string(body)),
classdecl :name [] curlyTrans:body -> ('class ' + string(name) + string(body)),
classdecl :name :bases curlyTrans:body -> ('class ' + string(name) + ':' + JOIN(bases, ',') + string(body)),

call trans:fn trans*:args -> (string(fn) + '(' + JOIN(args, ',') + ')'),
send :msg trans:recv trans*:args -> (string(recv) + '.' + string(msg) + '(' + JOIN(args, ',') + ')'),
Expand Down

0 comments on commit ffb3ef4

Please sign in to comment.