print(JsRender.Lang.keyword("delete") + "\n");
}
*/
+
+
namespace JsRender {
public Lang_Class Lang = null;
Gee.HashMap<string,string> keywordNames;
Gee.HashMap<string,string> puncNames;
Gee.HashMap<string,string> matchingNames;
+ public Gee.ArrayList<string> match_strings;
+
public Lang_Class ()
{
if (Lang != null) {
public bool isNewline (string str) {
return this.newlineNames.get(str) != null;
}
- public bool isBoolean (string str) {
- var ss = str.down();
+ public bool isBoolean (string str) {
+ var ss = str.down();
return ss == "false" || ss == "true";
}
+
+
void init() {
this.coreObjects = new GLib.List<string>();
this.keywordNames = new Gee.HashMap<string,string>();
this.puncNames = new Gee.HashMap<string,string>();
this.matchingNames = new Gee.HashMap<string,string>();
-
+ this.match_strings = new Gee.ArrayList<string>();
string[] co = { "_global_", "Array", "Boolean", "Date", "Error",
"Function", "Math", "Number", "Object", "RegExp", "String" };
for(var i =0; i< co.length;i++ ) {
this.coreObjects.append(co[i]);
+ this.match_strings.add(co[i]);
}
string[] ws = {
" :SPACE",
for(var i =0; i< ws.length;i++ ) {
var x = ws[i].split(":");
this.keywordNames.set(x[0],x[1]);
+ this.match_strings.add(x[0].substring(1));
}
var x = ws[i].split(":");
this.matchingNames.set(x[0],x[1]);
}
+
+
+
+
}