222 lines
6.4 KiB
Smali
222 lines
6.4 KiB
Smali
.class public Lcom/discord/simpleast/a/a$c;
|
|
.super Lcom/discord/simpleast/core/parser/Rule$a;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/simpleast/a/a;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x9
|
|
name = "c"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<R:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Lcom/discord/simpleast/core/parser/Rule$a<",
|
|
"TR;",
|
|
"Lcom/discord/simpleast/core/node/Node<",
|
|
"TR;>;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final styleSpanProvider:Lkotlin/jvm/functions/Function1;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Ljava/lang/Integer;",
|
|
"Landroid/text/style/CharacterStyle;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/util/regex/Pattern;Lkotlin/jvm/functions/Function1;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/regex/Pattern;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Ljava/lang/Integer;",
|
|
"+",
|
|
"Landroid/text/style/CharacterStyle;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "pattern"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "styleSpanProvider"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/simpleast/core/parser/Rule$a;-><init>(Ljava/util/regex/Pattern;)V
|
|
|
|
iput-object p2, p0, Lcom/discord/simpleast/a/a$c;->styleSpanProvider:Lkotlin/jvm/functions/Function1;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lkotlin/jvm/functions/Function1;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Ljava/lang/Integer;",
|
|
"+",
|
|
"Landroid/text/style/CharacterStyle;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "styleSpanProvider"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lcom/discord/simpleast/a/a;->yK:Lcom/discord/simpleast/a/a;
|
|
|
|
invoke-static {}, Lcom/discord/simpleast/a/a;->ek()Ljava/util/regex/Pattern;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0, v0, p1}, Lcom/discord/simpleast/a/a$c;-><init>(Ljava/util/regex/Pattern;Lkotlin/jvm/functions/Function1;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method protected createHeaderStyleNode(Ljava/lang/String;)Lcom/discord/simpleast/core/node/StyleNode;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/String;",
|
|
")",
|
|
"Lcom/discord/simpleast/core/node/StyleNode<",
|
|
"TR;",
|
|
"Landroid/text/style/CharacterStyle;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "headerStyleGroup"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Ljava/lang/String;->length()I
|
|
|
|
move-result p1
|
|
|
|
new-instance v0, Lcom/discord/simpleast/core/node/StyleNode;
|
|
|
|
iget-object v1, p0, Lcom/discord/simpleast/a/a$c;->styleSpanProvider:Lkotlin/jvm/functions/Function1;
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {v1, p1}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Lkotlin/a/l;->by(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Lcom/discord/simpleast/core/node/StyleNode;-><init>(Ljava/util/List;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method protected final getStyleSpanProvider()Lkotlin/jvm/functions/Function1;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Ljava/lang/Integer;",
|
|
"Landroid/text/style/CharacterStyle;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/simpleast/a/a$c;->styleSpanProvider:Lkotlin/jvm/functions/Function1;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public parse(Ljava/util/regex/Matcher;Lcom/discord/simpleast/core/parser/Parser;)Lcom/discord/simpleast/core/parser/ParseSpec;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/regex/Matcher;",
|
|
"Lcom/discord/simpleast/core/parser/Parser<",
|
|
"TR;-",
|
|
"Lcom/discord/simpleast/core/node/Node<",
|
|
"TR;>;>;)",
|
|
"Lcom/discord/simpleast/core/parser/ParseSpec<",
|
|
"TR;",
|
|
"Lcom/discord/simpleast/core/node/Node<",
|
|
"TR;>;>;"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "matcher"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "parser"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object p2, Lcom/discord/simpleast/core/parser/ParseSpec;->yq:Lcom/discord/simpleast/core/parser/ParseSpec$a;
|
|
|
|
const/4 p2, 0x1
|
|
|
|
invoke-virtual {p1, p2}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "matcher.group(1)"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, p2}, Lcom/discord/simpleast/a/a$c;->createHeaderStyleNode(Ljava/lang/String;)Lcom/discord/simpleast/core/node/StyleNode;
|
|
|
|
move-result-object p2
|
|
|
|
check-cast p2, Lcom/discord/simpleast/core/node/Node;
|
|
|
|
const/4 v0, 0x2
|
|
|
|
invoke-virtual {p1, v0}, Ljava/util/regex/Matcher;->start(I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {p1, v0}, Ljava/util/regex/Matcher;->end(I)I
|
|
|
|
move-result p1
|
|
|
|
invoke-static {p2, v1, p1}, Lcom/discord/simpleast/core/parser/ParseSpec$a;->a(Lcom/discord/simpleast/core/node/Node;II)Lcom/discord/simpleast/core/parser/ParseSpec;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|