Exemplo n.º 1
0
def _doc_handler(tag, val):
    if tag == 'type':
        return '`{}`'.format(val)
    elif tag == 'route':
        return '`{}`'.format(helpers.fmt_camel(val))
    elif tag == 'link':
        anchor, link = val.rsplit(' ', 1)
        return '`{}` <{}>'.format(anchor, link)
    elif tag == 'val':
        if val == 'null':
            return 'nil'
        else:
            return val
    elif tag == 'field':
        return '`{}`'.format(val)
    else:
        raise RuntimeError('Unknown doc ref tag %r' % tag)
Exemplo n.º 2
0
def fmt_var(name):
    return fmt_camel(name)
Exemplo n.º 3
0
def fmt_func(name, version):
    if version == 1:
        return fmt_camel(name)
    return fmt_camel(name) + 'V{}'.format(version)
def fmt_var(name):
    return fmt_camel(name)
def fmt_func(name, version):
    if version == 1:
        return fmt_camel(name)
    return fmt_camel(name) + 'V{}'.format(version)
Exemplo n.º 6
0
def fmt_var(name, export=True, check_reserved=False):
    s = helpers.fmt_pascal(name) if export else helpers.fmt_camel(name)
    return _rename_if_reserved(s) if check_reserved else s
Exemplo n.º 7
0
def fmt_func(name):
    return fmt_camel(name)
Exemplo n.º 8
0
def fmt_func(name):
    return fmt_camel(name)