From 9b621f330bb02f3c51bd200b0a6b8294210c4dba Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 19 Apr 2013 08:43:04 -0700 Subject: [PATCH] Doc TextMateScopeSelector --- src/app/text-mate-scope-selector.coffee | 9 +++++++++ 1 file changed, 9 insertions(+) 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)