mirror of
https://github.com/flynx/pWiki.git
synced 2026-08-24 08:16:43 +00:00
playing with root vs parent ns...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
0257273be6
commit
ab53f86ed0
@ -656,9 +656,10 @@ module.BaseParser = {
|
|||||||
// time it only should care about what was promised
|
// time it only should care about what was promised
|
||||||
// before it neglecting what came after.
|
// before it neglecting what came after.
|
||||||
var res = that.callMacro(page, name, args, body, {
|
var res = that.callMacro(page, name, args, body, {
|
||||||
// global state...
|
// global/parent state...
|
||||||
__proto__: state,
|
__proto__: state,
|
||||||
state,
|
root: state.root ?? state,
|
||||||
|
parent: state,
|
||||||
// local state...
|
// local state...
|
||||||
waitAll: state.waitAll,
|
waitAll: state.waitAll,
|
||||||
waitNested: state.waitNested,
|
waitNested: state.waitNested,
|
||||||
@ -895,7 +896,10 @@ module.BaseParser = {
|
|||||||
return Promise.awaitOrRun(
|
return Promise.awaitOrRun(
|
||||||
// XXX LOCAL_STATE
|
// XXX LOCAL_STATE
|
||||||
//...(state.unresolved ?? []),
|
//...(state.unresolved ?? []),
|
||||||
state.wait,
|
state.hasOwnProperty('wait') ?
|
||||||
|
state.wait
|
||||||
|
// XXX
|
||||||
|
: null,
|
||||||
function(){
|
function(){
|
||||||
//delete state.unresolved
|
//delete state.unresolved
|
||||||
// re-resolve...
|
// re-resolve...
|
||||||
@ -1197,7 +1201,8 @@ module.parser = {
|
|||||||
return '' }
|
return '' }
|
||||||
|
|
||||||
//* XXX LOCAL_STATE
|
//* XXX LOCAL_STATE
|
||||||
var vars = state.state.vars ??= {}
|
var vars = state.parent.vars ??= {}
|
||||||
|
//var vars = state.root.vars ??= {}
|
||||||
/*/
|
/*/
|
||||||
var vars = state.vars ??= {}
|
var vars = state.vars ??= {}
|
||||||
//*/
|
//*/
|
||||||
@ -1346,7 +1351,8 @@ module.parser = {
|
|||||||
var name = args.name
|
var name = args.name
|
||||||
|
|
||||||
//* XXX LOCAL_STATE
|
//* XXX LOCAL_STATE
|
||||||
var slots = state.state.slots ??= {}
|
var slots = state.parent.slots ??= {}
|
||||||
|
//var slots = state.root.slots ??= {}
|
||||||
/*/
|
/*/
|
||||||
var slots = state.slots ??= {}
|
var slots = state.slots ??= {}
|
||||||
//*/
|
//*/
|
||||||
@ -1709,7 +1715,8 @@ module.parser = {
|
|||||||
var that = this
|
var that = this
|
||||||
|
|
||||||
//* XXX LOCAL_STATE
|
//* XXX LOCAL_STATE
|
||||||
var macros = state.state.macros ??= {}
|
var macros = state.parent.macros ??= {}
|
||||||
|
//var macros = state.root.macros ??= {}
|
||||||
/*/
|
/*/
|
||||||
var macros = state.macros ??= {}
|
var macros = state.macros ??= {}
|
||||||
//*/
|
//*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user