221 lines
6.3 KiB
Smali
221 lines
6.3 KiB
Smali
.class public Lf/a/i/c/a$c;
|
|
.super Lcom/discord/simpleast/core/parser/Rule$BlockRule;
|
|
.source "MarkdownRules.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lf/a/i/c/a;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x9
|
|
name = "c"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<R:",
|
|
"Ljava/lang/Object;",
|
|
"S:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Lcom/discord/simpleast/core/parser/Rule$BlockRule<",
|
|
"TR;",
|
|
"Lcom/discord/simpleast/core/node/Node<",
|
|
"TR;>;TS;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public 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}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string/jumbo v0, "styleSpanProvider"
|
|
|
|
invoke-static {p2, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/simpleast/core/parser/Rule$BlockRule;-><init>(Ljava/util/regex/Pattern;)V
|
|
|
|
iput-object p2, p0, Lf/a/i/c/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/jumbo v0, "styleSpanProvider"
|
|
|
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lf/a/i/c/a;->e:Lf/a/i/c/a;
|
|
|
|
sget-object v0, Lf/a/i/c/a;->b:Ljava/util/regex/Pattern;
|
|
|
|
invoke-direct {p0, v0, p1}, Lf/a/i/c/a$c;-><init>(Ljava/util/regex/Pattern;Lkotlin/jvm/functions/Function1;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public 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}, Lz/n/c/j;->checkNotNullParameter(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, Lf/a/i/c/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}, Lf/h/a/f/f/n/f;->listOf(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 public 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, Lf/a/i/c/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;Ljava/lang/Object;)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;>;TS;>;TS;)",
|
|
"Lcom/discord/simpleast/core/parser/ParseSpec<",
|
|
"TR;TS;>;"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "matcher"
|
|
|
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "parser"
|
|
|
|
invoke-static {p2, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
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}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p0, p2}, Lf/a/i/c/a$c;->createHeaderStyleNode(Ljava/lang/String;)Lcom/discord/simpleast/core/node/StyleNode;
|
|
|
|
move-result-object p2
|
|
|
|
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
|
|
|
|
const-string v0, "node"
|
|
|
|
invoke-static {p2, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v0, Lcom/discord/simpleast/core/parser/ParseSpec;
|
|
|
|
invoke-direct {v0, p2, p3, v1, p1}, Lcom/discord/simpleast/core/parser/ParseSpec;-><init>(Lcom/discord/simpleast/core/node/Node;Ljava/lang/Object;II)V
|
|
|
|
return-object v0
|
|
.end method
|