Map<String, dynamic> toJson() { return { 'type': type.name, 'value': value, 'line': line, 'column': column, 'offset': offset, }; }