resources/RooUsage.txt
[app.Builder.js] / src / JsRender / Lang.vala
index 14099bb..2f5308a 100644 (file)
@@ -12,6 +12,8 @@ void main () {
     print(JsRender.Lang.keyword("delete") + "\n");
 }
 */
+
 namespace JsRender { 
     public Lang_Class Lang = null;
     
@@ -23,6 +25,8 @@ namespace JsRender {
         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) {
@@ -82,12 +86,14 @@ namespace JsRender {
         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>();
@@ -97,13 +103,14 @@ namespace JsRender {
             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",
@@ -164,6 +171,7 @@ namespace JsRender {
             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));
             }
         
       
@@ -223,6 +231,10 @@ namespace JsRender {
                var x = ws[i].split(":");
                this.matchingNames.set(x[0],x[1]);
            }
+           
+           
+           
+           
         }