mirror of
https://github.com/RustyRaptor/brackets.git
synced 2026-12-04 00:15:22 -07:00
Add built-in global objects, and a TODO to also add built-in global properties and associations.
This commit is contained in:
1 parent
9a8c8e8c3f
commit
9c371fc518
3 files changed
+41
-12
No files matched your search
@@ -162,8 +162,6 @@ function require(url) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
globals.sort(function (a, b) { return a.value < b.value; });
|
||||
return globals;
|
||||
}
|
||||
|
||||
@@ -210,9 +208,15 @@ function require(url) {
|
||||
comment : true
|
||||
});
|
||||
|
||||
var scope = new Scope(ast),
|
||||
definedGlobals = extractGlobals(ast.comments),
|
||||
builtinGlobals = HintUtils.BUILTIN_GLOBALS,
|
||||
allGlobals = definedGlobals.concat(builtinGlobals),
|
||||
comparator = function (a, b) { return a.value < b.value; };
|
||||
|
||||
respond(dir, file, text.length, {
|
||||
scope : new Scope(ast),
|
||||
globals : extractGlobals(ast.comments)
|
||||
scope : scope,
|
||||
globals : allGlobals.sort(comparator)
|
||||
});
|
||||
} catch (err) {
|
||||
// If parsing fails, we can try again after blanking out the line
|
||||
|
||||
Reference in new issue
Block a user