421 lines
10 KiB
Smali
421 lines
10 KiB
Smali
.class public Lf/a/j/b/a$a;
|
|
.super Lf/a/j/b/a$b;
|
|
.source "MarkdownRules.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lf/a/j/b/a;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x9
|
|
name = "a"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<RC:",
|
|
"Ljava/lang/Object;",
|
|
"T:",
|
|
"Ljava/lang/Object;",
|
|
"S:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Lf/a/j/b/a$b<",
|
|
"TRC;TS;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final classSpanProvider:Lkotlin/jvm/functions/Function1;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Ljava/lang/String;",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final innerRules:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/simpleast/core/parser/Rule<",
|
|
"TRC;",
|
|
"Lcom/discord/simpleast/core/node/Node<",
|
|
"TRC;>;TS;>;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Ljava/lang/Integer;",
|
|
"+",
|
|
"Landroid/text/style/CharacterStyle;",
|
|
">;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Ljava/lang/String;",
|
|
"+TT;>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-static {v0}, Lf/a/j/a/b/a;->b(Z)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lf/a/j/a/b/a;->h:Lf/a/j/a/b/a;
|
|
|
|
invoke-virtual {v1}, Lf/a/j/a/b/a;->e()Lcom/discord/simpleast/core/parser/Rule;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v0, v1}, Li0/i/l;->plus(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0, p1, p2, v0}, Lf/a/j/b/a$a;-><init>(Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Ljava/util/List;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "classSpanProvider"
|
|
|
|
invoke-static {p1}, Li0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "styleSpanProvider"
|
|
|
|
invoke-static {p1}, Li0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public constructor <init>(Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Ljava/util/List;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Ljava/lang/Integer;",
|
|
"+",
|
|
"Landroid/text/style/CharacterStyle;",
|
|
">;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Ljava/lang/String;",
|
|
"+TT;>;",
|
|
"Ljava/util/List<",
|
|
"+",
|
|
"Lcom/discord/simpleast/core/parser/Rule<",
|
|
"TRC;",
|
|
"Lcom/discord/simpleast/core/node/Node<",
|
|
"TRC;>;TS;>;>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
sget-object v0, Lf/a/j/b/a;->e:Lf/a/j/b/a;
|
|
|
|
sget-object v0, Lf/a/j/b/a;->d:Ljava/util/regex/Pattern;
|
|
|
|
invoke-direct {p0, v0, p1}, Lf/a/j/b/a$b;-><init>(Ljava/util/regex/Pattern;Lkotlin/jvm/functions/Function1;)V
|
|
|
|
iput-object p2, p0, Lf/a/j/b/a$a;->classSpanProvider:Lkotlin/jvm/functions/Function1;
|
|
|
|
iput-object p3, p0, Lf/a/j/b/a$a;->innerRules:Ljava/util/List;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "innerRules"
|
|
|
|
invoke-static {p1}, Li0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "classSpanProvider"
|
|
|
|
invoke-static {p1}, Li0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
const-string p1, "styleSpanProvider"
|
|
|
|
invoke-static {p1}, Li0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final getClassSpanProvider()Lkotlin/jvm/functions/Function1;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Ljava/lang/String;",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lf/a/j/b/a$a;->classSpanProvider:Lkotlin/jvm/functions/Function1;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getInnerRules()Ljava/util/List;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/simpleast/core/parser/Rule<",
|
|
"TRC;",
|
|
"Lcom/discord/simpleast/core/node/Node<",
|
|
"TRC;>;TS;>;>;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lf/a/j/b/a$a;->innerRules:Ljava/util/List;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public parse(Ljava/util/regex/Matcher;Lcom/discord/simpleast/core/parser/Parser;Ljava/lang/Object;)Lcom/discord/simpleast/core/parser/ParseSpec;
|
|
.locals 5
|
|
.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_9
|
|
|
|
if-eqz p2, :cond_8
|
|
|
|
const/4 v1, 0x4
|
|
|
|
invoke-virtual {p1, v1}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "matcher.group(4)"
|
|
|
|
invoke-static {v1, v2}, Li0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, v1}, Lf/a/j/b/a$b;->createHeaderStyleNode(Ljava/lang/String;)Lcom/discord/simpleast/core/node/StyleNode;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-virtual {p1, v2}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v3, 0x3
|
|
|
|
invoke-virtual {p1, v3}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
:goto_0
|
|
iget-object v4, p0, Lf/a/j/b/a$a;->innerRules:Ljava/util/List;
|
|
|
|
invoke-virtual {p2, v3, p3, v4}, Lcom/discord/simpleast/core/parser/Parser;->parse(Ljava/lang/CharSequence;Ljava/lang/Object;Ljava/util/List;)Ljava/util/List;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-interface {p2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p2
|
|
|
|
:goto_1
|
|
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
check-cast v3, Lcom/discord/simpleast/core/node/Node;
|
|
|
|
invoke-virtual {v1, v3}, Lcom/discord/simpleast/core/node/Node;->addChild(Lcom/discord/simpleast/core/node/Node;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
new-instance p1, Lkotlin/TypeCastException;
|
|
|
|
const-string p2, "null cannot be cast to non-null type com.discord.simpleast.core.node.Node<RC>"
|
|
|
|
invoke-direct {p1, p2}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_2
|
|
const/4 p2, 0x2
|
|
|
|
invoke-virtual {p1, p2}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
invoke-static {p1}, Li0/t/p;->trim(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
new-array p2, v2, [C
|
|
|
|
const/16 v0, 0x20
|
|
|
|
const/4 v3, 0x0
|
|
|
|
aput-char v0, p2, v3
|
|
|
|
const/4 v0, 0x6
|
|
|
|
invoke-static {p1, p2, v3, v3, v0}, Li0/t/p;->split$default(Ljava/lang/CharSequence;[CZII)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_3
|
|
if-eqz v0, :cond_5
|
|
|
|
new-instance p1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p2
|
|
|
|
:cond_4
|
|
:goto_2
|
|
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/String;
|
|
|
|
iget-object v3, p0, Lf/a/j/b/a$a;->classSpanProvider:Lkotlin/jvm/functions/Function1;
|
|
|
|
invoke-interface {v3, v0}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
invoke-interface {p1, v0}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_2
|
|
|
|
:cond_5
|
|
sget-object p1, Li0/i/n;->d:Li0/i/n;
|
|
|
|
:cond_6
|
|
invoke-interface {p1}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result p2
|
|
|
|
xor-int/2addr p2, v2
|
|
|
|
if-eqz p2, :cond_7
|
|
|
|
new-instance p2, Lcom/discord/simpleast/core/node/StyleNode;
|
|
|
|
invoke-direct {p2, p1}, Lcom/discord/simpleast/core/node/StyleNode;-><init>(Ljava/util/List;)V
|
|
|
|
invoke-virtual {p2, v1}, Lcom/discord/simpleast/core/node/Node;->addChild(Lcom/discord/simpleast/core/node/Node;)V
|
|
|
|
move-object v1, p2
|
|
|
|
:cond_7
|
|
new-instance p1, Lcom/discord/simpleast/core/parser/ParseSpec;
|
|
|
|
invoke-direct {p1, v1, p3}, Lcom/discord/simpleast/core/parser/ParseSpec;-><init>(Lcom/discord/simpleast/core/node/Node;Ljava/lang/Object;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_8
|
|
const-string p1, "parser"
|
|
|
|
invoke-static {p1}, Li0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_9
|
|
const-string p1, "matcher"
|
|
|
|
invoke-static {p1}, Li0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|