151 lines
4 KiB
Smali
151 lines
4 KiB
Smali
.class public final Lcom/discord/utilities/textprocessing/Rules$MarkdownListItemRule;
|
|
.super Lcom/discord/simpleast/core/parser/Rule$BlockRule;
|
|
.source "Rules.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/utilities/textprocessing/Rules;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "MarkdownListItemRule"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<RC:",
|
|
"Ljava/lang/Object;",
|
|
"S:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Lcom/discord/simpleast/core/parser/Rule$BlockRule<",
|
|
"TRC;",
|
|
"Lcom/discord/simpleast/core/node/Node<",
|
|
"TRC;>;TS;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final spansProvider:Lkotlin/jvm/functions/Function0;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/Object;",
|
|
">;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lkotlin/jvm/functions/Function0;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
"+",
|
|
"Ljava/util/List<",
|
|
"+",
|
|
"Ljava/lang/Object;",
|
|
">;>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
sget-object v0, Le/a/g/b/a;->e:Le/a/g/b/a;
|
|
|
|
invoke-virtual {v0}, Le/a/g/b/a;->d()Ljava/util/regex/Pattern;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/simpleast/core/parser/Rule$BlockRule;-><init>(Ljava/util/regex/Pattern;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/utilities/textprocessing/Rules$MarkdownListItemRule;->spansProvider:Lkotlin/jvm/functions/Function0;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "spansProvider"
|
|
|
|
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public parse(Ljava/util/regex/Matcher;Lcom/discord/simpleast/core/parser/Parser;Ljava/lang/Object;)Lcom/discord/simpleast/core/parser/ParseSpec;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/regex/Matcher;",
|
|
"Lcom/discord/simpleast/core/parser/Parser<",
|
|
"TRC;-",
|
|
"Lcom/discord/simpleast/core/node/Node<",
|
|
"TRC;>;TS;>;TS;)",
|
|
"Lcom/discord/simpleast/core/parser/ParseSpec<",
|
|
"TRC;",
|
|
"Lcom/discord/simpleast/core/node/Node<",
|
|
"TRC;>;TS;>;"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
new-instance p2, Lcom/discord/simpleast/core/node/StyleNode;
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/textprocessing/Rules$MarkdownListItemRule;->spansProvider:Lkotlin/jvm/functions/Function0;
|
|
|
|
invoke-interface {v0}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/util/List;
|
|
|
|
invoke-direct {p2, v0}, Lcom/discord/simpleast/core/node/StyleNode;-><init>(Ljava/util/List;)V
|
|
|
|
sget-object v0, Lcom/discord/simpleast/core/parser/ParseSpec;->f:Lcom/discord/simpleast/core/parser/ParseSpec$a;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-virtual {p1, v1}, Ljava/util/regex/Matcher;->start(I)I
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {p1, v1}, Ljava/util/regex/Matcher;->end(I)I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {v0, p2, p3, v2, p1}, Lcom/discord/simpleast/core/parser/ParseSpec$a;->a(Lcom/discord/simpleast/core/node/Node;Ljava/lang/Object;II)Lcom/discord/simpleast/core/parser/ParseSpec;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
const-string p1, "parser"
|
|
|
|
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "matcher"
|
|
|
|
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|