]>
git.kianting.info Git - clo/blob - src/libclo/index.ts
1 import {tkTree
} from
"../parser";
4 function foo(arr
: tkTree
): tkTree
{
5 for (let i
= 0; i
< arr
.length
; i
++) {
8 if (Array.isArray(arr
)){
15 mainStream
: Array<string>;
16 preprocessors
: Array<Function>;
17 attributes
: object
; // a4 size(x,y)
21 this.preprocessors
= [];
23 this.attributes
= {"page" : [793.7, 1122.5]};
24 this.preprocessorRegister(foo
);
28 * register a function of preprocessor
31 public preprocessorRegister(f
: Function){
32 this.preprocessors
.push(f
);
37 var prepro
= this.mainStream
;
38 for (var i
= 0; i
<this.preprocessors
.length
; i
++){
39 prepro
= this.preprocessors
[i
](prepro
);
42 console
.log("test"+prepro
);
48 export let a
= new Clo();