基于自定义规则的番剧采集APP,支持流媒体在线观看,支持弹幕,支持实时超分辨率。
bbcode: musume gif
Prediditf35f3f7da0d9
diff --git a/assets/bbcode/BBCode.g4 b/assets/bbcode/BBCode.g4index e9f16086..72a812a3 100644--- a/assets/bbcode/BBCode.g4+++ b/assets/bbcode/BBCode.g4@@ -10,6 +10,7 @@ element: tag| plain| bgm+ | musume| sticker;@@ -28,6 +29,10 @@ bgm: ('(bgm' | '(BGM') id=STRING ')';+musume+ : '(musume_' id=STRING ')'+ ;+sticker: '(=A=)'| '(=w=)'diff --git a/lib/bbcode/bbcode_base_listener.dart b/lib/bbcode/bbcode_base_listener.dartindex 9101dda9..2ab959ad 100644--- a/lib/bbcode/bbcode_base_listener.dart+++ b/lib/bbcode/bbcode_base_listener.dart@@ -215,6 +215,15 @@ class BBCodeBaseListener implements BBCodeListener {@overridevoid exitBgm(BgmContext ctx) {}+ @override+ void enterMusume(MusumeContext ctx) {+ /// 处理 (musume_07) 类型的表情+ bbcode.add(BBCodeMusume(id: int.tryParse(ctx.id!.text!) ?? 0));+ }++ @override+ void exitMusume(MusumeContext ctx) {}+@overridevoid enterSticker(StickerContext ctx) {/// 处理 (=A=) 类型的表情diff --git a/lib/bbcode/bbcode_elements.dart b/lib/bbcode/bbcode_elements.dartindex 45942b38..63527fdb 100644--- a/lib/bbcode/bbcode_elements.dart+++ b/lib/bbcode/bbcode_elements.dart@@ -63,6 +63,12 @@ class BBCodeBgm {BBCodeBgm({required this.id});}+class BBCodeMusume {+ int id;++ BBCodeMusume({required this.id});+}+class BBCodeSticker {int id;diff --git a/lib/bbcode/bbcode_widget.dart b/lib/bbcode/bbcode_widget.dartindex 353fa7f8..50818eb4 100644--- a/lib/bbcode/bbcode_widget.dart+++ b/lib/bbcode/bbcode_widget.dart@@ -151,6 +151,19 @@ class _BBCodeWidgetState extends State<BBCodeWidget> {},),);+ } else if (e is BBCodeMusume) {+ return WidgetSpan(+ child: CachedNetworkImage(+ imageUrl: 'https://lain.bgm.tv/img/smiles/musume/musume_${e.id}.gif',+ placeholder: (context, url) =>+ const SizedBox(width: 1, height: 1),+ errorWidget: (context, error, stackTrace) {+ return const Text('.');+ },+ width: 50,+ height: 50,+ ),+ );} else if (e is BBCodeSticker) {return WidgetSpan(child: CachedNetworkImage(diff --git a/lib/bbcode/generated/BBCode.tokens b/lib/bbcode/generated/BBCode.tokensindex da7b91df..bd15b248 100644--- a/lib/bbcode/generated/BBCode.tokens+++ b/lib/bbcode/generated/BBCode.tokens@@ -25,7 +25,8 @@ T__23=24T__24=25T__25=26T__26=27-STRING=28+T__27=28+STRING=29'['=1'='=2']'=3@@ -37,19 +38,20 @@ STRING=28'[来自Bangumi for iOS]'=9'(bgm'=10'(BGM'=11-'(=A=)'=12-'(=w=)'=13-'(-w=)'=14-'(S_S)'=15-'(=v=)'=16-'(@_@)'=17-'(=W=)'=18-'(TAT)'=19-'(T_T)'=20-'(=\'=)'=21-'(=3=)'=22-'(= =\')'=23-'(=///=)'=24-'(=.,=)'=25-'(:P)'=26-'(LOL)'=27+'(musume_'=12+'(=A=)'=13+'(=w=)'=14+'(-w=)'=15+'(S_S)'=16+'(=v=)'=17+'(@_@)'=18+'(=W=)'=19+'(TAT)'=20+'(T_T)'=21+'(=\'=)'=22+'(=3=)'=23+'(= =\')'=24+'(=///=)'=25+'(=.,=)'=26+'(:P)'=27+'(LOL)'=28diff --git a/lib/bbcode/generated/BBCodeLexer.dart b/lib/bbcode/generated/BBCodeLexer.dartindex 00dbc099..10dd7f59 100644--- a/lib/bbcode/generated/BBCodeLexer.dart+++ b/lib/bbcode/generated/BBCodeLexer.dart@@ -1,3 +1,5 @@+// Generated from ./assets/bbcode/BBCode.g4 by ANTLR 4.13.2+// ignore_for_file: unused_import, unused_local_variable, prefer_single_quotesimport 'package:antlr4/antlr4.dart';@@ -14,7 +16,7 @@ class BBCodeLexer extends Lexer {TOKEN_T__14 = 15, TOKEN_T__15 = 16, TOKEN_T__16 = 17, TOKEN_T__17 = 18,TOKEN_T__18 = 19, TOKEN_T__19 = 20, TOKEN_T__20 = 21, TOKEN_T__21 = 22,TOKEN_T__22 = 23, TOKEN_T__23 = 24, TOKEN_T__24 = 25, TOKEN_T__25 = 26,- TOKEN_T__26 = 27, TOKEN_STRING = 28;+ TOKEN_T__26 = 27, TOKEN_T__27 = 28, TOKEN_STRING = 29;@overridefinal List<String> channelNames = ['DEFAULT_TOKEN_CHANNEL', 'HIDDEN'@@ -30,20 +32,20 @@ class BBCodeLexer extends Lexer {'T__0', 'T__1', 'T__2', 'T__3', 'T__4', 'T__5', 'T__6', 'T__7', 'T__8','T__9', 'T__10', 'T__11', 'T__12', 'T__13', 'T__14', 'T__15', 'T__16','T__17', 'T__18', 'T__19', 'T__20', 'T__21', 'T__22', 'T__23', 'T__24',- 'T__25', 'T__26', 'STRING'+ 'T__25', 'T__26', 'T__27', 'STRING'];static final List<String?> _LITERAL_NAMES = [- null, "'['", "'='", "']'", "'[/'", "'/'", "'('", "')'", "'[\\u6765\\u81EABangumi for android]'",- "'[\\u6765\\u81EABangumi for iOS]'", "'(bgm'", "'(BGM'", "'(=A=)'",- "'(=w=)'", "'(-w=)'", "'(S_S)'", "'(=v=)'", "'(@_@)'", "'(=W=)'",- "'(TAT)'", "'(T_T)'", "'(='=)'", "'(=3=)'", "'(= =')'", "'(=///=)'",- "'(=.,=)'", "'(:P)'", "'(LOL)'"+ null, "'['", "'='", "']'", "'[/'", "'/'", "'('", "')'", "'[\\u93C9\\u30E8\\u569CBangumi for android]'",+ "'[\\u93C9\\u30E8\\u569CBangumi for iOS]'", "'(bgm'", "'(BGM'", "'(musume_'",+ "'(=A=)'", "'(=w=)'", "'(-w=)'", "'(S_S)'", "'(=v=)'", "'(@_@)'",+ "'(=W=)'", "'(TAT)'", "'(T_T)'", "'(='=)'", "'(=3=)'", "'(= =')'",+ "'(=///=)'", "'(=.,=)'", "'(:P)'", "'(LOL)'"];static final List<String?> _SYMBOLIC_NAMES = [null, null, null, null, null, null, null, null, null, null, null,null, null, null, null, null, null, null, null, null, null, null,- null, null, null, null, null, null, "STRING"+ null, null, null, null, null, null, null, "STRING"];static final Vocabulary VOCABULARY = VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);@@ -67,80 +69,84 @@ class BBCodeLexer extends Lexer {ATN getATN() { return _ATN; }static const List<int> _serializedATN = [- 4,0,28,230,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,+ 4,0,29,243,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,- 27,7,27,1,0,1,0,1,1,1,1,1,2,1,2,1,3,1,3,1,3,1,4,1,4,1,5,1,5,1,6,1,- 6,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,- 1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,- 8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9,- 1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,11,1,12,1,12,1,- 12,1,12,1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,- 1,14,1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,- 16,1,17,1,17,1,17,1,17,1,17,1,17,1,18,1,18,1,18,1,18,1,18,1,18,1,19,- 1,19,1,19,1,19,1,19,1,19,1,20,1,20,1,20,1,20,1,20,1,20,1,21,1,21,1,- 21,1,21,1,21,1,21,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,23,1,23,1,23,- 1,23,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,1,24,1,24,1,24,1,25,1,- 25,1,25,1,25,1,25,1,26,1,26,1,26,1,26,1,26,1,26,1,27,4,27,227,8,27,- 11,27,12,27,228,0,0,28,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,- 10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,- 21,43,22,45,23,47,24,49,25,51,26,53,27,55,28,1,0,1,4,0,40,41,61,61,- 91,91,93,93,230,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,+ 27,7,27,2,28,7,28,1,0,1,0,1,1,1,1,1,2,1,2,1,3,1,3,1,3,1,4,1,4,1,5,+ 1,5,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,+ 7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,+ 1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,+ 9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,+ 1,11,1,11,1,11,1,11,1,12,1,12,1,12,1,12,1,12,1,12,1,13,1,13,1,13,1,+ 13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,1,14,1,15,1,15,1,15,1,15,1,15,+ 1,15,1,16,1,16,1,16,1,16,1,16,1,16,1,17,1,17,1,17,1,17,1,17,1,17,1,+ 18,1,18,1,18,1,18,1,18,1,18,1,19,1,19,1,19,1,19,1,19,1,19,1,20,1,20,+ 1,20,1,20,1,20,1,20,1,21,1,21,1,21,1,21,1,21,1,21,1,22,1,22,1,22,1,+ 22,1,22,1,22,1,23,1,23,1,23,1,23,1,23,1,23,1,23,1,24,1,24,1,24,1,24,+ 1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,25,1,25,1,26,1,26,1,+ 26,1,26,1,26,1,27,1,27,1,27,1,27,1,27,1,27,1,28,4,28,240,8,28,11,28,+ 12,28,241,0,0,29,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,+ 11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,43,+ 22,45,23,47,24,49,25,51,26,53,27,55,28,57,29,1,0,1,4,0,40,41,61,61,+ 91,91,93,93,243,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,- 0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,1,57,1,0,0,0,3,59,1,0,0,0,- 5,61,1,0,0,0,7,63,1,0,0,0,9,66,1,0,0,0,11,68,1,0,0,0,13,70,1,0,0,0,- 15,72,1,0,0,0,17,96,1,0,0,0,19,116,1,0,0,0,21,121,1,0,0,0,23,126,1,- 0,0,0,25,132,1,0,0,0,27,138,1,0,0,0,29,144,1,0,0,0,31,150,1,0,0,0,- 33,156,1,0,0,0,35,162,1,0,0,0,37,168,1,0,0,0,39,174,1,0,0,0,41,180,- 1,0,0,0,43,186,1,0,0,0,45,192,1,0,0,0,47,199,1,0,0,0,49,207,1,0,0,- 0,51,214,1,0,0,0,53,219,1,0,0,0,55,226,1,0,0,0,57,58,5,91,0,0,58,2,- 1,0,0,0,59,60,5,61,0,0,60,4,1,0,0,0,61,62,5,93,0,0,62,6,1,0,0,0,63,- 64,5,91,0,0,64,65,5,47,0,0,65,8,1,0,0,0,66,67,5,47,0,0,67,10,1,0,0,- 0,68,69,5,40,0,0,69,12,1,0,0,0,70,71,5,41,0,0,71,14,1,0,0,0,72,73,- 5,91,0,0,73,74,5,26469,0,0,74,75,5,33258,0,0,75,76,5,66,0,0,76,77,- 5,97,0,0,77,78,5,110,0,0,78,79,5,103,0,0,79,80,5,117,0,0,80,81,5,109,- 0,0,81,82,5,105,0,0,82,83,5,32,0,0,83,84,5,102,0,0,84,85,5,111,0,0,- 85,86,5,114,0,0,86,87,5,32,0,0,87,88,5,97,0,0,88,89,5,110,0,0,89,90,- 5,100,0,0,90,91,5,114,0,0,91,92,5,111,0,0,92,93,5,105,0,0,93,94,5,- 100,0,0,94,95,5,93,0,0,95,16,1,0,0,0,96,97,5,91,0,0,97,98,5,26469,- 0,0,98,99,5,33258,0,0,99,100,5,66,0,0,100,101,5,97,0,0,101,102,5,110,- 0,0,102,103,5,103,0,0,103,104,5,117,0,0,104,105,5,109,0,0,105,106,- 5,105,0,0,106,107,5,32,0,0,107,108,5,102,0,0,108,109,5,111,0,0,109,- 110,5,114,0,0,110,111,5,32,0,0,111,112,5,105,0,0,112,113,5,79,0,0,- 113,114,5,83,0,0,114,115,5,93,0,0,115,18,1,0,0,0,116,117,5,40,0,0,- 117,118,5,98,0,0,118,119,5,103,0,0,119,120,5,109,0,0,120,20,1,0,0,- 0,121,122,5,40,0,0,122,123,5,66,0,0,123,124,5,71,0,0,124,125,5,77,- 0,0,125,22,1,0,0,0,126,127,5,40,0,0,127,128,5,61,0,0,128,129,5,65,- 0,0,129,130,5,61,0,0,130,131,5,41,0,0,131,24,1,0,0,0,132,133,5,40,- 0,0,133,134,5,61,0,0,134,135,5,119,0,0,135,136,5,61,0,0,136,137,5,- 41,0,0,137,26,1,0,0,0,138,139,5,40,0,0,139,140,5,45,0,0,140,141,5,- 119,0,0,141,142,5,61,0,0,142,143,5,41,0,0,143,28,1,0,0,0,144,145,5,- 40,0,0,145,146,5,83,0,0,146,147,5,95,0,0,147,148,5,83,0,0,148,149,- 5,41,0,0,149,30,1,0,0,0,150,151,5,40,0,0,151,152,5,61,0,0,152,153,- 5,118,0,0,153,154,5,61,0,0,154,155,5,41,0,0,155,32,1,0,0,0,156,157,- 5,40,0,0,157,158,5,64,0,0,158,159,5,95,0,0,159,160,5,64,0,0,160,161,- 5,41,0,0,161,34,1,0,0,0,162,163,5,40,0,0,163,164,5,61,0,0,164,165,- 5,87,0,0,165,166,5,61,0,0,166,167,5,41,0,0,167,36,1,0,0,0,168,169,- 5,40,0,0,169,170,5,84,0,0,170,171,5,65,0,0,171,172,5,84,0,0,172,173,- 5,41,0,0,173,38,1,0,0,0,174,175,5,40,0,0,175,176,5,84,0,0,176,177,- 5,95,0,0,177,178,5,84,0,0,178,179,5,41,0,0,179,40,1,0,0,0,180,181,- 5,40,0,0,181,182,5,61,0,0,182,183,5,39,0,0,183,184,5,61,0,0,184,185,- 5,41,0,0,185,42,1,0,0,0,186,187,5,40,0,0,187,188,5,61,0,0,188,189,- 5,51,0,0,189,190,5,61,0,0,190,191,5,41,0,0,191,44,1,0,0,0,192,193,- 5,40,0,0,193,194,5,61,0,0,194,195,5,32,0,0,195,196,5,61,0,0,196,197,- 5,39,0,0,197,198,5,41,0,0,198,46,1,0,0,0,199,200,5,40,0,0,200,201,- 5,61,0,0,201,202,5,47,0,0,202,203,5,47,0,0,203,204,5,47,0,0,204,205,- 5,61,0,0,205,206,5,41,0,0,206,48,1,0,0,0,207,208,5,40,0,0,208,209,- 5,61,0,0,209,210,5,46,0,0,210,211,5,44,0,0,211,212,5,61,0,0,212,213,- 5,41,0,0,213,50,1,0,0,0,214,215,5,40,0,0,215,216,5,58,0,0,216,217,- 5,80,0,0,217,218,5,41,0,0,218,52,1,0,0,0,219,220,5,40,0,0,220,221,- 5,76,0,0,221,222,5,79,0,0,222,223,5,76,0,0,223,224,5,41,0,0,224,54,- 1,0,0,0,225,227,8,0,0,0,226,225,1,0,0,0,227,228,1,0,0,0,228,226,1,- 0,0,0,228,229,1,0,0,0,229,56,1,0,0,0,2,0,228,0+ 0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,1,59,1,0,0,0,+ 3,61,1,0,0,0,5,63,1,0,0,0,7,65,1,0,0,0,9,68,1,0,0,0,11,70,1,0,0,0,+ 13,72,1,0,0,0,15,74,1,0,0,0,17,99,1,0,0,0,19,120,1,0,0,0,21,125,1,+ 0,0,0,23,130,1,0,0,0,25,139,1,0,0,0,27,145,1,0,0,0,29,151,1,0,0,0,+ 31,157,1,0,0,0,33,163,1,0,0,0,35,169,1,0,0,0,37,175,1,0,0,0,39,181,+ 1,0,0,0,41,187,1,0,0,0,43,193,1,0,0,0,45,199,1,0,0,0,47,205,1,0,0,+ 0,49,212,1,0,0,0,51,220,1,0,0,0,53,227,1,0,0,0,55,232,1,0,0,0,57,239,+ 1,0,0,0,59,60,5,91,0,0,60,2,1,0,0,0,61,62,5,61,0,0,62,4,1,0,0,0,63,+ 64,5,93,0,0,64,6,1,0,0,0,65,66,5,91,0,0,66,67,5,47,0,0,67,8,1,0,0,+ 0,68,69,5,47,0,0,69,10,1,0,0,0,70,71,5,40,0,0,71,12,1,0,0,0,72,73,+ 5,41,0,0,73,14,1,0,0,0,74,75,5,91,0,0,75,76,5,37833,0,0,76,77,5,12520,+ 0,0,77,78,5,22172,0,0,78,79,5,66,0,0,79,80,5,97,0,0,80,81,5,110,0,+ 0,81,82,5,103,0,0,82,83,5,117,0,0,83,84,5,109,0,0,84,85,5,105,0,0,+ 85,86,5,32,0,0,86,87,5,102,0,0,87,88,5,111,0,0,88,89,5,114,0,0,89,+ 90,5,32,0,0,90,91,5,97,0,0,91,92,5,110,0,0,92,93,5,100,0,0,93,94,5,+ 114,0,0,94,95,5,111,0,0,95,96,5,105,0,0,96,97,5,100,0,0,97,98,5,93,+ 0,0,98,16,1,0,0,0,99,100,5,91,0,0,100,101,5,37833,0,0,101,102,5,12520,+ 0,0,102,103,5,22172,0,0,103,104,5,66,0,0,104,105,5,97,0,0,105,106,+ 5,110,0,0,106,107,5,103,0,0,107,108,5,117,0,0,108,109,5,109,0,0,109,+ 110,5,105,0,0,110,111,5,32,0,0,111,112,5,102,0,0,112,113,5,111,0,0,+ 113,114,5,114,0,0,114,115,5,32,0,0,115,116,5,105,0,0,116,117,5,79,+ 0,0,117,118,5,83,0,0,118,119,5,93,0,0,119,18,1,0,0,0,120,121,5,40,+ 0,0,121,122,5,98,0,0,122,123,5,103,0,0,123,124,5,109,0,0,124,20,1,+ 0,0,0,125,126,5,40,0,0,126,127,5,66,0,0,127,128,5,71,0,0,128,129,5,+ 77,0,0,129,22,1,0,0,0,130,131,5,40,0,0,131,132,5,109,0,0,132,133,5,+ 117,0,0,133,134,5,115,0,0,134,135,5,117,0,0,135,136,5,109,0,0,136,+ 137,5,101,0,0,137,138,5,95,0,0,138,24,1,0,0,0,139,140,5,40,0,0,140,+ 141,5,61,0,0,141,142,5,65,0,0,142,143,5,61,0,0,143,144,5,41,0,0,144,+ 26,1,0,0,0,145,146,5,40,0,0,146,147,5,61,0,0,147,148,5,119,0,0,148,+ 149,5,61,0,0,149,150,5,41,0,0,150,28,1,0,0,0,151,152,5,40,0,0,152,+ 153,5,45,0,0,153,154,5,119,0,0,154,155,5,61,0,0,155,156,5,41,0,0,156,+ 30,1,0,0,0,157,158,5,40,0,0,158,159,5,83,0,0,159,160,5,95,0,0,160,+ 161,5,83,0,0,161,162,5,41,0,0,162,32,1,0,0,0,163,164,5,40,0,0,164,+ 165,5,61,0,0,165,166,5,118,0,0,166,167,5,61,0,0,167,168,5,41,0,0,168,+ 34,1,0,0,0,169,170,5,40,0,0,170,171,5,64,0,0,171,172,5,95,0,0,172,+ 173,5,64,0,0,173,174,5,41,0,0,174,36,1,0,0,0,175,176,5,40,0,0,176,+ 177,5,61,0,0,177,178,5,87,0,0,178,179,5,61,0,0,179,180,5,41,0,0,180,+ 38,1,0,0,0,181,182,5,40,0,0,182,183,5,84,0,0,183,184,5,65,0,0,184,+ 185,5,84,0,0,185,186,5,41,0,0,186,40,1,0,0,0,187,188,5,40,0,0,188,+ 189,5,84,0,0,189,190,5,95,0,0,190,191,5,84,0,0,191,192,5,41,0,0,192,+ 42,1,0,0,0,193,194,5,40,0,0,194,195,5,61,0,0,195,196,5,39,0,0,196,+ 197,5,61,0,0,197,198,5,41,0,0,198,44,1,0,0,0,199,200,5,40,0,0,200,+ 201,5,61,0,0,201,202,5,51,0,0,202,203,5,61,0,0,203,204,5,41,0,0,204,+ 46,1,0,0,0,205,206,5,40,0,0,206,207,5,61,0,0,207,208,5,32,0,0,208,+ 209,5,61,0,0,209,210,5,39,0,0,210,211,5,41,0,0,211,48,1,0,0,0,212,+ 213,5,40,0,0,213,214,5,61,0,0,214,215,5,47,0,0,215,216,5,47,0,0,216,+ 217,5,47,0,0,217,218,5,61,0,0,218,219,5,41,0,0,219,50,1,0,0,0,220,+ 221,5,40,0,0,221,222,5,61,0,0,222,223,5,46,0,0,223,224,5,44,0,0,224,+ 225,5,61,0,0,225,226,5,41,0,0,226,52,1,0,0,0,227,228,5,40,0,0,228,+ 229,5,58,0,0,229,230,5,80,0,0,230,231,5,41,0,0,231,54,1,0,0,0,232,+ 233,5,40,0,0,233,234,5,76,0,0,234,235,5,79,0,0,235,236,5,76,0,0,236,+ 237,5,41,0,0,237,56,1,0,0,0,238,240,8,0,0,0,239,238,1,0,0,0,240,241,+ 1,0,0,0,241,239,1,0,0,0,241,242,1,0,0,0,242,58,1,0,0,0,2,0,241,0];static final ATN _ATN =diff --git a/lib/bbcode/generated/BBCodeListener.dart b/lib/bbcode/generated/BBCodeListener.dartindex 3c994659..5fecfaf0 100644--- a/lib/bbcode/generated/BBCodeListener.dart+++ b/lib/bbcode/generated/BBCodeListener.dart@@ -1,3 +1,5 @@+// Generated from ./assets/bbcode/BBCode.g4 by ANTLR 4.13.2+// ignore_for_file: unused_import, unused_local_variable, prefer_single_quotesimport 'package:antlr4/antlr4.dart';import 'BBCodeParser.dart';@@ -40,6 +42,13 @@ abstract class BBCodeListener extends ParseTreeListener {/// [ctx] the parse treevoid exitBgm(BgmContext ctx);+ /// Enter a parse tree produced by [BBCodeParser.musume].+ /// [ctx] the parse tree+ void enterMusume(MusumeContext ctx);+ /// Exit a parse tree produced by [BBCodeParser.musume].+ /// [ctx] the parse tree+ void exitMusume(MusumeContext ctx);+/// Enter a parse tree produced by [BBCodeParser.sticker]./// [ctx] the parse treevoid enterSticker(StickerContext ctx);diff --git a/lib/bbcode/generated/BBCodeParser.dart b/lib/bbcode/generated/BBCodeParser.dartindex f0e75d53..97fbf0e8 100644--- a/lib/bbcode/generated/BBCodeParser.dart+++ b/lib/bbcode/generated/BBCodeParser.dart@@ -1,8 +1,10 @@+// Generated from ./assets/bbcode/BBCode.g4 by ANTLR 4.13.2+// ignore_for_file: unused_import, unused_local_variable, prefer_single_quotesimport 'package:antlr4/antlr4.dart';import 'BBCodeListener.dart';const int RULE_document = 0, RULE_element = 1, RULE_tag = 2, RULE_plain = 3,- RULE_bgm = 4, RULE_sticker = 5;+ RULE_bgm = 4, RULE_musume = 5, RULE_sticker = 6;class BBCodeParser extends Parser {static final checkVersion = () => RuntimeMetaData.checkVersion('4.13.2', RuntimeMetaData.VERSION);static const int TOKEN_EOF = IntStream.EOF;@@ -18,24 +20,24 @@ class BBCodeParser extends Parser {TOKEN_T__18 = 19, TOKEN_T__19 = 20, TOKEN_T__20 = 21,TOKEN_T__21 = 22, TOKEN_T__22 = 23, TOKEN_T__23 = 24,TOKEN_T__24 = 25, TOKEN_T__25 = 26, TOKEN_T__26 = 27,- TOKEN_STRING = 28;+ TOKEN_T__27 = 28, TOKEN_STRING = 29;@overridefinal List<String> ruleNames = [- 'document', 'element', 'tag', 'plain', 'bgm', 'sticker'+ 'document', 'element', 'tag', 'plain', 'bgm', 'musume', 'sticker'];static final List<String?> _LITERAL_NAMES = [- null, "'['", "'='", "']'", "'[/'", "'/'", "'('", "')'", "'[\\u6765\\u81EABangumi for android]'",- "'[\\u6765\\u81EABangumi for iOS]'", "'(bgm'", "'(BGM'", "'(=A=)'",- "'(=w=)'", "'(-w=)'", "'(S_S)'", "'(=v=)'", "'(@_@)'", "'(=W=)'",- "'(TAT)'", "'(T_T)'", "'(='=)'", "'(=3=)'", "'(= =')'", "'(=///=)'",- "'(=.,=)'", "'(:P)'", "'(LOL)'"+ null, "'['", "'='", "']'", "'[/'", "'/'", "'('", "')'", "'[\\u93C9\\u30E8\\u569CBangumi for android]'",+ "'[\\u93C9\\u30E8\\u569CBangumi for iOS]'", "'(bgm'", "'(BGM'", "'(musume_'",+ "'(=A=)'", "'(=w=)'", "'(-w=)'", "'(S_S)'", "'(=v=)'", "'(@_@)'",+ "'(=W=)'", "'(TAT)'", "'(T_T)'", "'(='=)'", "'(=3=)'", "'(= =')'",+ "'(=///=)'", "'(=.,=)'", "'(:P)'", "'(LOL)'"];static final List<String?> _SYMBOLIC_NAMES = [null, null, null, null, null, null, null, null, null, null, null,null, null, null, null, null, null, null, null, null, null, null,- null, null, null, null, null, null, "STRING"+ null, null, null, null, null, null, null, "STRING"];static final Vocabulary VOCABULARY = VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);@@ -65,17 +67,17 @@ class BBCodeParser extends Parser {int _la;try {enterOuterAlt(_localctx, 1);- state = 15;+ state = 17;errorHandler.sync(this);_la = tokenStream.LA(1)!;- while ((((_la) & ~0x3f) == 0 && ((1 << _la) & 536870894) != 0)) {- state = 12;+ while ((((_la) & ~0x3f) == 0 && ((1 << _la) & 1073741806) != 0)) {+ state = 14;element();- state = 17;+ state = 19;errorHandler.sync(this);_la = tokenStream.LA(1)!;}- state = 18;+ state = 20;match(TOKEN_EOF);} on RecognitionException catch (re) {_localctx.exception = re;@@ -91,27 +93,32 @@ class BBCodeParser extends Parser {dynamic _localctx = ElementContext(context, state);enterRule(_localctx, 2, RULE_element);try {- state = 24;+ state = 27;errorHandler.sync(this);switch (interpreter!.adaptivePredict(tokenStream, 1, context)) {case 1:enterOuterAlt(_localctx, 1);- state = 20;+ state = 22;tag();break;case 2:enterOuterAlt(_localctx, 2);- state = 21;+ state = 23;plain();break;case 3:enterOuterAlt(_localctx, 3);- state = 22;+ state = 24;bgm();break;case 4:enterOuterAlt(_localctx, 4);- state = 23;+ state = 25;+ musume();+ break;+ case 5:+ enterOuterAlt(_localctx, 5);+ state = 26;sticker();break;}@@ -131,37 +138,37 @@ class BBCodeParser extends Parser {int _la;try {enterOuterAlt(_localctx, 1);- state = 26;+ state = 29;match(TOKEN_T__0);- state = 27;- _localctx.tagName = match(TOKEN_STRING);state = 30;+ _localctx.tagName = match(TOKEN_STRING);+ state = 33;errorHandler.sync(this);_la = tokenStream.LA(1)!;if (_la == TOKEN_T__1) {- state = 28;+ state = 31;match(TOKEN_T__1);- state = 29;+ state = 32;_localctx.attr = match(TOKEN_STRING);}- state = 32;+ state = 35;match(TOKEN_T__2);- state = 36;+ state = 39;errorHandler.sync(this);_la = tokenStream.LA(1)!;- while ((((_la) & ~0x3f) == 0 && ((1 << _la) & 536870894) != 0)) {- state = 33;+ while ((((_la) & ~0x3f) == 0 && ((1 << _la) & 1073741806) != 0)) {+ state = 36;_localctx.content = element();- state = 38;+ state = 41;errorHandler.sync(this);_la = tokenStream.LA(1)!;}- state = 39;+ state = 42;match(TOKEN_T__3);- state = 40;+ state = 43;match(TOKEN_STRING);- state = 41;+ state = 44;match(TOKEN_T__2);} on RecognitionException catch (re) {_localctx.exception = re;@@ -179,7 +186,7 @@ class BBCodeParser extends Parser {int _la;try {int _alt;- state = 50;+ state = 53;errorHandler.sync(this);switch (tokenStream.LA(1)!) {case TOKEN_T__0:@@ -190,15 +197,15 @@ class BBCodeParser extends Parser {case TOKEN_T__6:case TOKEN_STRING:enterOuterAlt(_localctx, 1);- state = 44;+ state = 47;errorHandler.sync(this);_alt = 1;do {switch (_alt) {case 1:- state = 43;+ state = 46;_la = tokenStream.LA(1)!;- if (!((((_la) & ~0x3f) == 0 && ((1 << _la) & 268435694) != 0))) {+ if (!((((_la) & ~0x3f) == 0 && ((1 << _la) & 536871150) != 0))) {errorHandler.recoverInline(this);} else {if ( tokenStream.LA(1)! == IntStream.EOF ) matchedEOF = true;@@ -209,19 +216,19 @@ class BBCodeParser extends Parser {default:throw NoViableAltException(this);}- state = 46;+ state = 49;errorHandler.sync(this);_alt = interpreter!.adaptivePredict(tokenStream, 4, context);} while (_alt != 2 && _alt != ATN.INVALID_ALT_NUMBER);break;case TOKEN_T__7:enterOuterAlt(_localctx, 2);- state = 48;+ state = 51;match(TOKEN_T__7);break;case TOKEN_T__8:enterOuterAlt(_localctx, 3);- state = 49;+ state = 52;match(TOKEN_T__8);break;default:@@ -243,7 +250,7 @@ class BBCodeParser extends Parser {int _la;try {enterOuterAlt(_localctx, 1);- state = 52;+ state = 55;_la = tokenStream.LA(1)!;if (!(_la == TOKEN_T__9 || _la == TOKEN_T__10)) {errorHandler.recoverInline(this);@@ -252,9 +259,30 @@ class BBCodeParser extends Parser {errorHandler.reportMatch(this);consume();}- state = 53;+ state = 56;+ _localctx.id = match(TOKEN_STRING);+ state = 57;+ match(TOKEN_T__6);+ } on RecognitionException catch (re) {+ _localctx.exception = re;+ errorHandler.reportError(this, re);+ errorHandler.recover(this, re);+ } finally {+ exitRule();+ }+ return _localctx;+ }++ MusumeContext musume() {+ dynamic _localctx = MusumeContext(context, state);+ enterRule(_localctx, 10, RULE_musume);+ try {+ enterOuterAlt(_localctx, 1);+ state = 59;+ match(TOKEN_T__11);+ state = 60;_localctx.id = match(TOKEN_STRING);- state = 54;+ state = 61;match(TOKEN_T__6);} on RecognitionException catch (re) {_localctx.exception = re;@@ -268,13 +296,13 @@ class BBCodeParser extends Parser {StickerContext sticker() {dynamic _localctx = StickerContext(context, state);- enterRule(_localctx, 10, RULE_sticker);+ enterRule(_localctx, 12, RULE_sticker);int _la;try {enterOuterAlt(_localctx, 1);- state = 56;+ state = 63;_la = tokenStream.LA(1)!;- if (!((((_la) & ~0x3f) == 0 && ((1 << _la) & 268431360) != 0))) {+ if (!((((_la) & ~0x3f) == 0 && ((1 << _la) & 536862720) != 0))) {errorHandler.recoverInline(this);} else {if ( tokenStream.LA(1)! == IntStream.EOF ) matchedEOF = true;@@ -292,25 +320,27 @@ class BBCodeParser extends Parser {}static const List<int> _serializedATN = [- 4,1,28,59,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,1,0,5,0,- 14,8,0,10,0,12,0,17,9,0,1,0,1,0,1,1,1,1,1,1,1,1,3,1,25,8,1,1,2,1,2,- 1,2,1,2,3,2,31,8,2,1,2,1,2,5,2,35,8,2,10,2,12,2,38,9,2,1,2,1,2,1,2,- 1,2,1,3,4,3,45,8,3,11,3,12,3,46,1,3,1,3,3,3,51,8,3,1,4,1,4,1,4,1,4,- 1,5,1,5,1,5,0,0,6,0,2,4,6,8,10,0,3,3,0,1,3,5,7,28,28,1,0,10,11,1,0,- 12,27,61,0,15,1,0,0,0,2,24,1,0,0,0,4,26,1,0,0,0,6,50,1,0,0,0,8,52,- 1,0,0,0,10,56,1,0,0,0,12,14,3,2,1,0,13,12,1,0,0,0,14,17,1,0,0,0,15,- 13,1,0,0,0,15,16,1,0,0,0,16,18,1,0,0,0,17,15,1,0,0,0,18,19,5,0,0,1,- 19,1,1,0,0,0,20,25,3,4,2,0,21,25,3,6,3,0,22,25,3,8,4,0,23,25,3,10,- 5,0,24,20,1,0,0,0,24,21,1,0,0,0,24,22,1,0,0,0,24,23,1,0,0,0,25,3,1,- 0,0,0,26,27,5,1,0,0,27,30,5,28,0,0,28,29,5,2,0,0,29,31,5,28,0,0,30,- 28,1,0,0,0,30,31,1,0,0,0,31,32,1,0,0,0,32,36,5,3,0,0,33,35,3,2,1,0,- 34,33,1,0,0,0,35,38,1,0,0,0,36,34,1,0,0,0,36,37,1,0,0,0,37,39,1,0,- 0,0,38,36,1,0,0,0,39,40,5,4,0,0,40,41,5,28,0,0,41,42,5,3,0,0,42,5,- 1,0,0,0,43,45,7,0,0,0,44,43,1,0,0,0,45,46,1,0,0,0,46,44,1,0,0,0,46,- 47,1,0,0,0,47,51,1,0,0,0,48,51,5,8,0,0,49,51,5,9,0,0,50,44,1,0,0,0,- 50,48,1,0,0,0,50,49,1,0,0,0,51,7,1,0,0,0,52,53,7,1,0,0,53,54,5,28,- 0,0,54,55,5,7,0,0,55,9,1,0,0,0,56,57,7,2,0,0,57,11,1,0,0,0,6,15,24,- 30,36,46,50+ 4,1,29,66,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,+ 1,0,5,0,16,8,0,10,0,12,0,19,9,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,3,1,28,+ 8,1,1,2,1,2,1,2,1,2,3,2,34,8,2,1,2,1,2,5,2,38,8,2,10,2,12,2,41,9,2,+ 1,2,1,2,1,2,1,2,1,3,4,3,48,8,3,11,3,12,3,49,1,3,1,3,3,3,54,8,3,1,4,+ 1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,6,1,6,1,6,0,0,7,0,2,4,6,8,10,12,0,3,+ 3,0,1,3,5,7,29,29,1,0,10,11,1,0,13,28,68,0,17,1,0,0,0,2,27,1,0,0,0,+ 4,29,1,0,0,0,6,53,1,0,0,0,8,55,1,0,0,0,10,59,1,0,0,0,12,63,1,0,0,0,+ 14,16,3,2,1,0,15,14,1,0,0,0,16,19,1,0,0,0,17,15,1,0,0,0,17,18,1,0,+ 0,0,18,20,1,0,0,0,19,17,1,0,0,0,20,21,5,0,0,1,21,1,1,0,0,0,22,28,3,+ 4,2,0,23,28,3,6,3,0,24,28,3,8,4,0,25,28,3,10,5,0,26,28,3,12,6,0,27,+ 22,1,0,0,0,27,23,1,0,0,0,27,24,1,0,0,0,27,25,1,0,0,0,27,26,1,0,0,0,+ 28,3,1,0,0,0,29,30,5,1,0,0,30,33,5,29,0,0,31,32,5,2,0,0,32,34,5,29,+ 0,0,33,31,1,0,0,0,33,34,1,0,0,0,34,35,1,0,0,0,35,39,5,3,0,0,36,38,+ 3,2,1,0,37,36,1,0,0,0,38,41,1,0,0,0,39,37,1,0,0,0,39,40,1,0,0,0,40,+ 42,1,0,0,0,41,39,1,0,0,0,42,43,5,4,0,0,43,44,5,29,0,0,44,45,5,3,0,+ 0,45,5,1,0,0,0,46,48,7,0,0,0,47,46,1,0,0,0,48,49,1,0,0,0,49,47,1,0,+ 0,0,49,50,1,0,0,0,50,54,1,0,0,0,51,54,5,8,0,0,52,54,5,9,0,0,53,47,+ 1,0,0,0,53,51,1,0,0,0,53,52,1,0,0,0,54,7,1,0,0,0,55,56,7,1,0,0,56,+ 57,5,29,0,0,57,58,5,7,0,0,58,9,1,0,0,0,59,60,5,12,0,0,60,61,5,29,0,+ 0,61,62,5,7,0,0,62,11,1,0,0,0,63,64,7,2,0,0,64,13,1,0,0,0,6,17,27,+ 33,39,49,53];static final ATN _ATN =@@ -337,6 +367,7 @@ class ElementContext extends ParserRuleContext {TagContext? tag() => getRuleContext<TagContext>(0);PlainContext? plain() => getRuleContext<PlainContext>(0);BgmContext? bgm() => getRuleContext<BgmContext>(0);+ MusumeContext? musume() => getRuleContext<MusumeContext>(0);StickerContext? sticker() => getRuleContext<StickerContext>(0);ElementContext([ParserRuleContext? parent, int? invokingState]) : super(parent, invokingState);@override@@ -404,6 +435,22 @@ class BgmContext extends ParserRuleContext {}}+class MusumeContext extends ParserRuleContext {+ Token? id;+ TerminalNode? STRING() => getToken(BBCodeParser.TOKEN_STRING, 0);+ MusumeContext([ParserRuleContext? parent, int? invokingState]) : super(parent, invokingState);+ @override+ int get ruleIndex => RULE_musume;+ @override+ void enterRule(ParseTreeListener listener) {+ if (listener is BBCodeListener) listener.enterMusume(this);+ }+ @override+ void exitRule(ParseTreeListener listener) {+ if (listener is BBCodeListener) listener.exitMusume(this);+ }+}+class StickerContext extends ParserRuleContext {StickerContext([ParserRuleContext? parent, int? invokingState]) : super(parent, invokingState);@override