summaryrefslogtreecommitdiffstats
path: root/Tools/c-analyzer/c_globals/show.py
blob: f4298b17b6788468f6898233e231d045ebbefb90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

def basic(globals, *,
          _print=print):
    """Print each row simply."""
    for variable in globals:
        if variable.funcname:
            line = f'{variable.filename}:{variable.funcname}():{variable.name}'
        else:
            line = f'{variable.filename}:{variable.name}'
        vartype = variable.vartype
        #if vartype.startswith('static '):
        #    vartype = vartype.partition(' ')[2]
        #else:
        #    vartype = '=' + vartype
        line = f'{line:<64} {vartype}'
        _print(line)