this.init();
//print("init Lang");
Lang = this;
+ Lang.ref();
}
return this.keywordNames.get("="+word);
}
- public string matching(string name) {
- return this.matchingNames.get(name);
+ public string? matching(string name) {
+
+
+ switch(name) {
+ case "LEFT_PAREN": return "RIGHT_PAREN";
+ case "RIGHT_PAREN": return "LEFT_PAREN";
+ case "LEFT_CURLY": return "RIGHT_CURLY";
+ case "RIGHT_CURLY": return "LEFT_CURLY";
+ case "LEFT_BRACE": return "RIGHT_BRACE";
+ case "RIGHT_BRACE": return "LEFT_BRACE";
+ default:
+ return null;
+ };
+
+ //return this.matchingNames.get(name);
}
public bool isKeyword(string word) {
return this.whitespaceNames.get(str) != null;
}
public bool isSpaceC (char str) {
- var s = (string)str;
+ var s = str.to_string();
return this.whitespaceNames.get(s) != null;
}
+
public bool isNewline (string str) {
return this.newlineNames.get(str) != null;
+ }
+ public bool isNewlineC (char str) {
+ var s =str.to_string();
+ return this.newlineNames.get(s) != null;
}
public bool isBoolean (string str) {
var ss = str.down();
this.puncNames.set(x[0],x[1]);
}
- ws = {
+ string[] wsp = {
"LEFT_PAREN:RIGHT_PAREN",
"RIGHT_PAREN:LEFT_PAREN",
"LEFT_CURLY:RIGHT_CURLY",
"LEFT_BRACE:RIGHT_BRACE",
"RIGHT_BRACE:LEFT_BRACE"
};
- for(var i =0; i< ws.length;i++ ) {
- var x = ws[i].split(":");
+ for(var i =0; i< wsp.length;i++ ) {
+ var x = wsp[i].split(":");
this.matchingNames.set(x[0],x[1]);
}