-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedenscript.js
More file actions
37 lines (29 loc) · 800 Bytes
/
edenscript.js
File metadata and controls
37 lines (29 loc) · 800 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
let EdenScript = {};
EdenScript.fragments = {};
EdenScript.createAST = function(src){
return new Eden.AST(src, undefined, this, {strict: true, noindex: true});
}
EdenScript.createFragment = function(title,cb){
EdenScript.fragments[title] = new Eden.Fragment(title,cb);
}
module.exports = {EdenScript};
/*function(frag){
if (this.fragment && this.fragment !== frag) {
this.fragment.unlock();
this.currentlineno = -1;
}
this.fragment = frag;
if (frag === undefined) {
this.gutter.clear();
this.readonly = true;
return;
}
// Make sure it is up-to-date
var me = this;
frag.reset(function() {
if (frag.ast) {
me.highlightContent(-1, 0);
me.gutter.setBaseAST(frag.ast.script);
}
});
}*/