1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

Personal_wiki: Refactor special pages

This commit is contained in:
gnosygnu
2017-02-10 15:19:12 -05:00
parent 0eee0f0207
commit b2781ffc9d
36 changed files with 539 additions and 244 deletions

View File

@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.texvcs.lxrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
import gplx.xowa.xtns.math.texvcs.tkns.*; import gplx.xowa.xtns.math.texvcs.funcs.*;
class Texvc_lxr__curly_bgn implements Texvc_lxr {
public class Texvc_lxr__curly_bgn implements Texvc_lxr {
public int Tid() {return Texvc_lxr_.Tid__curly_bgn;}
public int Make_tkn(Texvc_ctx ctx, Texvc_root root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
int uid = root.Regy__add(Texvc_tkn_.Tid__curly, Texvc_tkn_mkr.Singleton_id__null, bgn_pos, cur_pos, new Texvc_tkn__func(Texvc_func_itm_.Itm__arg));
@@ -25,12 +25,3 @@ class Texvc_lxr__curly_bgn implements Texvc_lxr {
return cur_pos;
}
}
class Texvc_lxr__curly_end implements Texvc_lxr {
public int Tid() {return Texvc_lxr_.Tid__curly_end;}
public int Make_tkn(Texvc_ctx ctx, Texvc_root root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
int bgn_uid = ctx.Stack().Pop_or_fail();
root.Regy__take_from_root_end(bgn_uid);
root.Regy__update_end(bgn_uid, cur_pos);
return cur_pos;
}
}

View File

@@ -0,0 +1,28 @@
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.math.texvcs.lxrs; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*; import gplx.xowa.xtns.math.*; import gplx.xowa.xtns.math.texvcs.*;
import gplx.xowa.xtns.math.texvcs.tkns.*;
public class Texvc_lxr__curly_end implements Texvc_lxr {
public int Tid() {return Texvc_lxr_.Tid__curly_end;}
public int Make_tkn(Texvc_ctx ctx, Texvc_root root, byte[] src, int src_len, int bgn_pos, int cur_pos) {
int bgn_uid = ctx.Stack().Pop_or_fail();
root.Regy__take_from_root_end(bgn_uid);
root.Regy__update_end(bgn_uid, cur_pos);
return cur_pos;
}
}