145 lines
3.5 KiB
Smali
145 lines
3.5 KiB
Smali
.class public abstract Lcom/discord/simpleast/core/parser/Rule;
|
|
.super Ljava/lang/Object;
|
|
.source "Rule.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/simpleast/core/parser/Rule$BlockRule;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<R:",
|
|
"Ljava/lang/Object;",
|
|
"T:",
|
|
"Lcom/discord/simpleast/core/node/Node<",
|
|
"TR;>;S:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final matcher:Ljava/util/regex/Matcher;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Ljava/util/regex/Matcher;)V
|
|
.locals 0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/simpleast/core/parser/Rule;->matcher:Ljava/util/regex/Matcher;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "matcher"
|
|
|
|
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public constructor <init>(Ljava/util/regex/Pattern;)V
|
|
.locals 1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const-string v0, ""
|
|
|
|
invoke-virtual {p1, v0}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "pattern.matcher(\"\")"
|
|
|
|
invoke-static {p1, v0}, Lx/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/simpleast/core/parser/Rule;-><init>(Ljava/util/regex/Matcher;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "pattern"
|
|
|
|
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final getMatcher()Ljava/util/regex/Matcher;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/simpleast/core/parser/Rule;->matcher:Ljava/util/regex/Matcher;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public match(Ljava/lang/CharSequence;Ljava/lang/String;Ljava/lang/Object;)Ljava/util/regex/Matcher;
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/CharSequence;",
|
|
"Ljava/lang/String;",
|
|
"TS;)",
|
|
"Ljava/util/regex/Matcher;"
|
|
}
|
|
.end annotation
|
|
|
|
const/4 p2, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget-object p3, p0, Lcom/discord/simpleast/core/parser/Rule;->matcher:Ljava/util/regex/Matcher;
|
|
|
|
invoke-virtual {p3, p1}, Ljava/util/regex/Matcher;->reset(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
|
|
|
|
iget-object p1, p0, Lcom/discord/simpleast/core/parser/Rule;->matcher:Ljava/util/regex/Matcher;
|
|
|
|
invoke-virtual {p1}, Ljava/util/regex/Matcher;->find()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object p2, p0, Lcom/discord/simpleast/core/parser/Rule;->matcher:Ljava/util/regex/Matcher;
|
|
|
|
:cond_0
|
|
return-object p2
|
|
|
|
:cond_1
|
|
const-string p1, "inspectionSource"
|
|
|
|
invoke-static {p1}, Lx/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw p2
|
|
.end method
|
|
|
|
.method public abstract parse(Ljava/util/regex/Matcher;Lcom/discord/simpleast/core/parser/Parser;Ljava/lang/Object;)Lcom/discord/simpleast/core/parser/ParseSpec;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/regex/Matcher;",
|
|
"Lcom/discord/simpleast/core/parser/Parser<",
|
|
"TR;-TT;TS;>;TS;)",
|
|
"Lcom/discord/simpleast/core/parser/ParseSpec<",
|
|
"TR;TT;TS;>;"
|
|
}
|
|
.end annotation
|
|
.end method
|