X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=JSDOC%2FScopeParser.vala;h=7efbe309cf4d0e9bc6c5dc9c1fcee80888400de1;hb=6e49907f256e6e78a69df47de7de772bab07e0d1;hp=e993773ec9b540934d253079824a8b231b5f889e;hpb=0c62ca32cc799884fffeb4b2b7715d8cea8649fd;p=gnome.introspection-doc-generator
diff --git a/JSDOC/ScopeParser.vala b/JSDOC/ScopeParser.vala
index e993773..7efbe30 100644
--- a/JSDOC/ScopeParser.vala
+++ b/JSDOC/ScopeParser.vala
@@ -419,21 +419,22 @@ namespace JSDOC {
// print('SCOPE-STRING:' + token.toString());
//println(""+token.data+"");
- if (this.ts.lookTok(-1).data == '{' && this.ts.lookTok(1).data == ':') {
+ if (this.ts.lookTok(-1).data == "{" && this.ts.lookTok(1).data == ":") {
// then we are in an object lit.. -> we need to flag the brace as such...
- isObjectLitAr.pop();
- isObjectLitAr.push(true);
+ isObjectLitAr.remove_at(isObjectLitAr.size-1);
+ isObjectLitAr.add(true);
//print(">>>>>> OBJLIT REPUSH(true)");
}
- isInObjectLitAr = isObjectLitAr[isObjectLitAr.length-1];
+ isInObjectLitAr = isObjectLitAr.get(isObjectLitAr.size-1);
- if (isInObjectLitAr && this.ts.lookTok(1).data == ':' &&
- ( this.ts.lookTok(-1).data == '{' || this.ts.lookTok(-1).data == ':' )) {
+ if (isInObjectLitAr && this.ts.lookTok(1).data == ":" &&
+ ( this.ts.lookTok(-1).data == "{" || this.ts.lookTok(-1).data == ":" )) {
// see if we can replace..
// remove the quotes..
// should do a bit more checking!!!! (what about wierd char's in the string..
var str = token.data.substring(1,token.data.length-1);
- if (/^[a-z_]+$/i.test(str) && ScopeParser.idents.indexOf(str) < 0) {
+
+ if (Regex.match_simple ("^[a-z_]+$", str) && this.idents.index_of(str) < 0) {
token.outData = str;
}
@@ -458,10 +459,11 @@ namespace JSDOC {
//print("SYMBOL: " + token.toString());
symbol = token.data;
- if (symbol == 'this') {
+ if (symbol == "this") {
break;
}
- if (this.mode == 'PASS2_SYMBOL_TREE') {
+
+ if (this.mode == ScopeParserMode.PASS2_SYMBOL_TREE) {
//println("GOT IDENT: -2 : " + this.ts.lookT(-2).toString() + "
..... -1 : " + this.ts.lookT(-1).toString() + "
");
@@ -480,7 +482,7 @@ namespace JSDOC {
// We don't need to declare longer symbols since they won't cause
// any conflict with other munged symbols.
this.globalScope.declareIdentifier(symbol, token);
- this.warn("Found an undeclared symbol: " + symbol + ' (line:' + token.line + ')', true);
+ this.warn("Found an undeclared symbol: " + symbol + " (line:" + token.line + ")", true);
}
//println("GOT IDENT IGNORE(3): " + symbol + "
");