|
|
@ -310,15 +310,15 @@ abstract class _NodeVisitor<T> { |
|
|
|
extension _NodeX on Node { |
|
|
|
extension _NodeX on Node { |
|
|
|
T accept<T>(_NodeVisitor<T> visitor, [T? context]) { |
|
|
|
T accept<T>(_NodeVisitor<T> visitor, [T? context]) { |
|
|
|
switch (runtimeType) { |
|
|
|
switch (runtimeType) { |
|
|
|
case Root _: |
|
|
|
case Root: |
|
|
|
return visitor.visitRoot(this as Root, context); |
|
|
|
return visitor.visitRoot(this as Root, context); |
|
|
|
case Block _: |
|
|
|
case Block: |
|
|
|
return visitor.visitBlock(this as Block, context); |
|
|
|
return visitor.visitBlock(this as Block, context); |
|
|
|
case Line _: |
|
|
|
case Line: |
|
|
|
return visitor.visitLine(this as Line, context); |
|
|
|
return visitor.visitLine(this as Line, context); |
|
|
|
case QuillText _: |
|
|
|
case QuillText: |
|
|
|
return visitor.visitText(this as QuillText, context); |
|
|
|
return visitor.visitText(this as QuillText, context); |
|
|
|
case Embed _: |
|
|
|
case Embed: |
|
|
|
return visitor.visitEmbed(this as Embed, context); |
|
|
|
return visitor.visitEmbed(this as Embed, context); |
|
|
|
} |
|
|
|
} |
|
|
|
throw Exception('Container of type $runtimeType cannot be visited'); |
|
|
|
throw Exception('Container of type $runtimeType cannot be visited'); |
|
|
|