2019-07-24 11:27:29 +00:00
|
|
|
.class public final Lcom/discord/utilities/textprocessing/Rules$createSpoilerRule$1;
|
|
|
|
.super Lcom/discord/simpleast/core/parser/Rule;
|
|
|
|
.source "Rules.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
|
|
value = Lcom/discord/utilities/textprocessing/Rules;->createSpoilerRule()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/SpoilerNode<",
|
|
|
|
"TT;>;TS;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2019-12-06 03:29:40 +00:00
|
|
|
.field public final synthetic this$0:Lcom/discord/utilities/textprocessing/Rules;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public constructor <init>(Lcom/discord/utilities/textprocessing/Rules;Ljava/util/regex/Pattern;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 0
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/regex/Pattern;",
|
|
|
|
")V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/utilities/textprocessing/Rules$createSpoilerRule$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
|
2019-12-06 03:29:40 +00:00
|
|
|
.method public parse(Ljava/util/regex/Matcher;Lcom/discord/simpleast/core/parser/Parser;Ljava/lang/Object;)Lcom/discord/simpleast/core/parser/ParseSpec;
|
|
|
|
.locals 4
|
2019-07-24 11:27:29 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/regex/Matcher;",
|
|
|
|
"Lcom/discord/simpleast/core/parser/Parser<",
|
|
|
|
"TT;-",
|
|
|
|
"Lcom/discord/utilities/textprocessing/node/SpoilerNode<",
|
|
|
|
"TT;>;TS;>;TS;)",
|
|
|
|
"Lcom/discord/simpleast/core/parser/ParseSpec<",
|
|
|
|
"TT;",
|
|
|
|
"Lcom/discord/utilities/textprocessing/node/SpoilerNode<",
|
|
|
|
"TT;>;TS;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
const/4 v0, 0x0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-16 02:27:13 +00:00
|
|
|
if-eqz p1, :cond_2
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-16 02:27:13 +00:00
|
|
|
if-eqz p2, :cond_1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-12-06 03:29:40 +00:00
|
|
|
sget-object p2, Lcom/discord/simpleast/core/parser/ParseSpec;->f:Lcom/discord/simpleast/core/parser/ParseSpec$a;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-16 02:27:13 +00:00
|
|
|
new-instance v1, Lcom/discord/utilities/textprocessing/node/SpoilerNode;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-16 02:27:13 +00:00
|
|
|
const/4 v2, 0x1
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-16 02:27:13 +00:00
|
|
|
invoke-virtual {p1, v2}, Ljava/util/regex/Matcher;->group(I)Ljava/lang/String;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-16 02:27:13 +00:00
|
|
|
move-result-object v3
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-16 02:27:13 +00:00
|
|
|
if-eqz v3, :cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-16 02:27:13 +00:00
|
|
|
invoke-direct {v1, v3}, Lcom/discord/utilities/textprocessing/node/SpoilerNode;-><init>(Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-16 02:27:13 +00:00
|
|
|
invoke-virtual {p1, v2}, Ljava/util/regex/Matcher;->start(I)I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-16 02:27:13 +00:00
|
|
|
move-result v0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2020-01-16 02:27:13 +00:00
|
|
|
invoke-virtual {p1, v2}, Ljava/util/regex/Matcher;->end(I)I
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
2020-01-16 02:27:13 +00:00
|
|
|
invoke-virtual {p2, v1, p3, v0, 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;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
:cond_0
|
2020-03-27 22:23:51 +00:00
|
|
|
invoke-static {}, Ly/u/b/j;->throwNpe()V
|
2020-01-16 02:27:13 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_1
|
2019-12-06 03:29:40 +00:00
|
|
|
const-string p1, "parser"
|
|
|
|
|
2020-03-27 22:23:51 +00:00
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
2020-01-16 02:27:13 +00:00
|
|
|
:cond_2
|
2019-12-06 03:29:40 +00:00
|
|
|
const-string p1, "matcher"
|
|
|
|
|
2020-03-27 22:23:51 +00:00
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
2019-12-06 03:29:40 +00:00
|
|
|
|
|
|
|
throw v0
|
2019-07-24 11:27:29 +00:00
|
|
|
.end method
|