toJson method
Implementation
Json toJson() => {
'kind': kind,
'word': word,
if (_of != null) 'of': _of,
if (to != null) 'to': to,
if (on != null) 'on': on,
if (value != null) 'value': value,
if (node != null) 'node': node,
'line': line,
'column': column,
'source': source,
'path': path,
if (kind == 'type') ...{
'texts': texts,
'parameters': parameters,
'flags': flags,
'events': events,
'children': children,
},
};