toJson method

  1. @override
Map<String, dynamic> toJson()
override

Implementation

@override
Map<String, dynamic> toJson() => <String, Object?>{
      'type': type,
      'script': script?.toJson(),
      'tokenPos': tokenPos ?? -1,
      if (endTokenPos case final endTokenPosValue?)
        'endTokenPos': endTokenPosValue,
      if (line case final lineValue?) 'line': lineValue,
      if (column case final columnValue?) 'column': columnValue,
    };