mirror of
https://github.com/flynx/pWiki.git
synced 2025-12-17 00:21:40 +00:00
working on macro expansion...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
e7812df701
commit
8baa8da94b
16
pwiki2.js
16
pwiki2.js
@ -508,6 +508,22 @@ function*(str){
|
|||||||
yield* group(lex(str)) }
|
yield* group(lex(str)) }
|
||||||
|
|
||||||
|
|
||||||
|
var expand =
|
||||||
|
module.expand =
|
||||||
|
function(str){
|
||||||
|
var parser = parse(str)
|
||||||
|
while(true){
|
||||||
|
var {elem, done} = parse.next()
|
||||||
|
if(done){
|
||||||
|
return }
|
||||||
|
// text block...
|
||||||
|
if(typeof(elem) == 'string'){
|
||||||
|
yield elem }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// XXX
|
// XXX
|
||||||
var expandPage =
|
var expandPage =
|
||||||
module.expandPage =
|
module.expandPage =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user