diff --git a/src/app/text-mate-scope-selector.coffee b/src/app/text-mate-scope-selector.coffee index 87058853e..f21007015 100644 --- a/src/app/text-mate-scope-selector.coffee +++ b/src/app/text-mate-scope-selector.coffee @@ -1,6 +1,7 @@ PEG = require 'pegjs' fsUtils = require 'fs-utils' +# Public: Test a stack of scopes to see if they match a scope selector. module.exports = class TextMateScopeSelector @parser: null @@ -14,8 +15,16 @@ class TextMateScopeSelector source: null matcher: null + # Public: Create a new scope selector. + # + # source - A {String} to parse as a scope selector. constructor: (@source) -> @matcher = TextMateScopeSelector.createParser().parse(@source) + # Public: Check if this scope selector matches the scopes. + # + # scopes - An {Array} of {String}s. + # + # Return a {Boolean}. matches: (scopes) -> @matcher.matches(scopes)