discord-jadx/app/src/main/java/com/discord/utilities/textprocessing/Rules$createChannelMentionR...

29 lines
1.3 KiB
Java

package com.discord.utilities.textprocessing;
import com.discord.simpleast.core.parser.ParseSpec;
import com.discord.simpleast.core.parser.Parser;
import com.discord.simpleast.core.parser.Rule;
import com.discord.utilities.textprocessing.node.ChannelMentionNode;
import d0.z.d.m;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/* compiled from: Rules.kt */
public final class Rules$createChannelMentionRule$1 extends Rule<T, ChannelMentionNode<T>, S> {
public final /* synthetic */ Rules this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public Rules$createChannelMentionRule$1(Rules rules, Pattern pattern) {
super(pattern);
this.this$0 = rules;
}
@Override // com.discord.simpleast.core.parser.Rule
public ParseSpec<T, S> parse(Matcher matcher, Parser<T, ? super ChannelMentionNode<T>, S> parser, S s2) {
m.checkNotNullParameter(matcher, "matcher");
m.checkNotNullParameter(parser, "parser");
ChannelMentionNode channelMentionNode = new ChannelMentionNode(Rules.toLongOrDefault$default(Rules.INSTANCE, matcher.group(1), 0, 1, null));
m.checkNotNullParameter(channelMentionNode, "node");
return new ParseSpec<>(channelMentionNode, s2);
}
}