108 lines
3.2 KiB
Smali
108 lines
3.2 KiB
Smali
.class public final Lcom/discord/utilities/textprocessing/Rules$createCodeBlockRule$1;
|
|
.super Lcom/discord/simpleast/core/parser/Rule;
|
|
.source "Rules.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
value = Lcom/discord/utilities/textprocessing/Rules;->createCodeBlockRule()Lcom/discord/simpleast/core/parser/Rule;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = null
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/simpleast/core/parser/Rule<",
|
|
"TT;",
|
|
"Lcom/discord/utilities/textprocessing/node/CodeNode<",
|
|
"TT;>;>;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field final synthetic this$0:Lcom/discord/utilities/textprocessing/Rules;
|
|
|
|
|
|
# direct methods
|
|
.method constructor <init>(Lcom/discord/utilities/textprocessing/Rules;Ljava/util/regex/Pattern;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/regex/Pattern;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
iput-object p1, p0, Lcom/discord/utilities/textprocessing/Rules$createCodeBlockRule$1;->this$0:Lcom/discord/utilities/textprocessing/Rules;
|
|
|
|
invoke-direct {p0, p2}, Lcom/discord/simpleast/core/parser/Rule;-><init>(Ljava/util/regex/Pattern;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final 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<",
|
|
"TT;-",
|
|
"Lcom/discord/utilities/textprocessing/node/CodeNode<",
|
|
"TT;>;>;)",
|
|
"Lcom/discord/simpleast/core/parser/ParseSpec<",
|
|
"TT;",
|
|
"Lcom/discord/utilities/textprocessing/node/CodeNode<",
|
|
"TT;>;>;"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "matcher"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "parser"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const/4 p2, 0x2
|
|
|
|
invoke-virtual {p1, p2}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
const/4 v0, 0x3
|
|
|
|
invoke-virtual {p1, v0}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
const-string p1, ""
|
|
|
|
:cond_0
|
|
sget-object v0, Lcom/discord/simpleast/core/parser/ParseSpec;->xg:Lcom/discord/simpleast/core/parser/ParseSpec$a;
|
|
|
|
new-instance v0, Lcom/discord/utilities/textprocessing/node/CodeNode;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, p1, v1, p2}, Lcom/discord/utilities/textprocessing/node/CodeNode;-><init>(Ljava/lang/String;ZLjava/lang/String;)V
|
|
|
|
check-cast v0, Lcom/discord/simpleast/core/node/Node;
|
|
|
|
invoke-static {v0}, Lcom/discord/simpleast/core/parser/ParseSpec$a;->a(Lcom/discord/simpleast/core/node/Node;)Lcom/discord/simpleast/core/parser/ParseSpec;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|