Skip to content

Instantly share code, notes, and snippets.

@leeonix
Last active December 3, 2018 19:45
Show Gist options
  • Save leeonix/700333e9c4fc0574ec7b to your computer and use it in GitHub Desktop.
Save leeonix/700333e9c4fc0574ec7b to your computer and use it in GitHub Desktop.
# coding: gbk
<%!
from textwrap import wrap
%>
local ${machine.name} = require '${machine.name}'
local delegate = {}
--------------------------------------------------------------------------------
-- input
% for i in machine.inputs:
%if i.comment:
%for l in wrap(i.comment, 80):
-- ${l}
%endfor
%endif
function delegate.${i.name}(param)
return false
end -- end function
% endfor
--------------------------------------------------------------------------------
-- output
% for o in machine.outputs:
%if o.comment:
% for l in wrap(o.comment, 80):
-- ${l}
% endfor
% endif
function delegate.${o.name}(param)
end -- end function
% endfor
${machine.name}.set_delegate(delegate)
return ${machine.name}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment