30 lines
1.2 KiB
Java
30 lines
1.2 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.UrlNode;
|
|
import d0.z.d.m;
|
|
import java.util.regex.Matcher;
|
|
import java.util.regex.Pattern;
|
|
/* compiled from: Rules.kt */
|
|
public final class Rules$createUrlRule$1 extends Rule<T, UrlNode<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$createUrlRule$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 UrlNode<T>, S> parser, S s2) {
|
|
m.checkNotNullParameter(matcher, "matcher");
|
|
m.checkNotNullParameter(parser, "parser");
|
|
String group = matcher.group(1);
|
|
m.checkNotNull(group);
|
|
UrlNode urlNode = new UrlNode(group, null, 2, null);
|
|
m.checkNotNullParameter(urlNode, "node");
|
|
return new ParseSpec<>(urlNode, s2);
|
|
}
|
|
}
|