first-mate
Advanced tools
Comparing version 4.1.8 to 4.2.0
40
api.json
@@ -6,3 +6,3 @@ { | ||
"filename": "src/grammar-registry.coffee", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.1.8/src/grammar-registry.coffee#L11", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.2.0/src/grammar-registry.coffee#L11", | ||
"sections": [ | ||
@@ -23,3 +23,3 @@ { | ||
"sectionName": "Event Subscription", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.1.8/src/grammar-registry.coffee#L36", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.2.0/src/grammar-registry.coffee#L36", | ||
"visibility": "Public", | ||
@@ -54,3 +54,3 @@ "summary": "Invoke the given callback when a grammar is added to the registry.", | ||
"sectionName": "Event Subscription", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.1.8/src/grammar-registry.coffee#L46", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.2.0/src/grammar-registry.coffee#L46", | ||
"visibility": "Public", | ||
@@ -85,3 +85,3 @@ "summary": "Invoke the given callback when a grammar is updated due to a grammar\nit depends on being added or removed from the registry.", | ||
"sectionName": "Managing Grammars", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.1.8/src/grammar-registry.coffee#L56", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.2.0/src/grammar-registry.coffee#L56", | ||
"visibility": "Public", | ||
@@ -100,3 +100,3 @@ "summary": "Get all the grammars in this registry.", | ||
"sectionName": "Managing Grammars", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.1.8/src/grammar-registry.coffee#L64", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.2.0/src/grammar-registry.coffee#L64", | ||
"visibility": "Public", | ||
@@ -123,3 +123,3 @@ "summary": "Get a grammar with the given scope name.", | ||
"sectionName": "Managing Grammars", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.1.8/src/grammar-registry.coffee#L76", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.2.0/src/grammar-registry.coffee#L76", | ||
"visibility": "Public", | ||
@@ -146,3 +146,3 @@ "summary": "Add a grammar to this registry.", | ||
"sectionName": "Managing Grammars", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.1.8/src/grammar-registry.coffee#L97", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.2.0/src/grammar-registry.coffee#L97", | ||
"visibility": "Public", | ||
@@ -169,3 +169,3 @@ "summary": "Remove the grammar with the given scope name.", | ||
"sectionName": "Managing Grammars", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.1.8/src/grammar-registry.coffee#L107", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.2.0/src/grammar-registry.coffee#L107", | ||
"visibility": "Public", | ||
@@ -192,3 +192,3 @@ "summary": "Read a grammar synchronously but don't add it to the registry.", | ||
"sectionName": "Managing Grammars", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.1.8/src/grammar-registry.coffee#L122", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.2.0/src/grammar-registry.coffee#L122", | ||
"visibility": "Public", | ||
@@ -235,3 +235,3 @@ "summary": "Read a grammar asynchronously but don't add it to the registry.", | ||
"sectionName": "Managing Grammars", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.1.8/src/grammar-registry.coffee#L139", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.2.0/src/grammar-registry.coffee#L139", | ||
"visibility": "Public", | ||
@@ -258,3 +258,3 @@ "summary": "Read a grammar synchronously and add it to this registry.", | ||
"sectionName": "Managing Grammars", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.1.8/src/grammar-registry.coffee#L152", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.2.0/src/grammar-registry.coffee#L152", | ||
"visibility": "Public", | ||
@@ -301,3 +301,3 @@ "summary": "Read a grammar asynchronously and add it to the registry.", | ||
"sectionName": "Managing Grammars", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.1.8/src/grammar-registry.coffee#L167", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.2.0/src/grammar-registry.coffee#L167", | ||
"visibility": "Public", | ||
@@ -324,3 +324,3 @@ "summary": "Get the grammar override for the given file path.", | ||
"sectionName": "Managing Grammars", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.1.8/src/grammar-registry.coffee#L176", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.2.0/src/grammar-registry.coffee#L176", | ||
"visibility": "Public", | ||
@@ -353,3 +353,3 @@ "summary": "Set the grammar override for the given file path.", | ||
"sectionName": "Managing Grammars", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.1.8/src/grammar-registry.coffee#L185", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.2.0/src/grammar-registry.coffee#L185", | ||
"visibility": "Public", | ||
@@ -376,3 +376,3 @@ "summary": "Remove the grammar override for the given file path.", | ||
"sectionName": "Managing Grammars", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.1.8/src/grammar-registry.coffee#L192", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.2.0/src/grammar-registry.coffee#L192", | ||
"visibility": "Public", | ||
@@ -391,3 +391,3 @@ "summary": "Remove all grammar overrides.", | ||
"sectionName": "Managing Grammars", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.1.8/src/grammar-registry.coffee#L205", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.2.0/src/grammar-registry.coffee#L205", | ||
"visibility": "Public", | ||
@@ -427,3 +427,3 @@ "summary": "Select a grammar for the given file path and file contents.", | ||
"filename": "src/grammar.coffee", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.1.8/src/grammar.coffee#L21", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.2.0/src/grammar.coffee#L21", | ||
"sections": [ | ||
@@ -444,3 +444,3 @@ { | ||
"sectionName": "Event Subscription", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.1.8/src/grammar.coffee#L61", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.2.0/src/grammar.coffee#L61", | ||
"visibility": "Public", | ||
@@ -467,3 +467,3 @@ "summary": "Invoke the given callback when this grammar is updated due to a\ngrammar it depends on being added or removed from the registry.", | ||
"sectionName": "Tokenizing", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.1.8/src/grammar.coffee#L73", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.2.0/src/grammar.coffee#L73", | ||
"visibility": "Public", | ||
@@ -490,3 +490,3 @@ "summary": "Tokenize all lines in the given text.", | ||
"sectionName": "Tokenizing", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.1.8/src/grammar.coffee#L103", | ||
"srcUrl": "https://github.com/atom/first-mate/blob/v4.2.0/src/grammar.coffee#L103", | ||
"visibility": "Public", | ||
@@ -493,0 +493,0 @@ "summary": "Tokenize the line of text.", |
@@ -154,12 +154,18 @@ (function() { | ||
Pattern.prototype.ruleForInclude = function(baseGrammar, name) { | ||
var _ref; | ||
if (name[0] === "#") { | ||
var grammarName, hashIndex, ruleName, _ref, _ref1; | ||
hashIndex = name.indexOf('#'); | ||
if (hashIndex === 0) { | ||
return this.grammar.getRepository()[name.slice(1)]; | ||
} else if (name === "$self") { | ||
} else if (hashIndex >= 1) { | ||
grammarName = name.slice(0, +(hashIndex - 1) + 1 || 9e9); | ||
ruleName = name.slice(hashIndex + 1); | ||
this.grammar.addIncludedGrammarScope(grammarName); | ||
return (_ref = this.registry.grammarForScopeName(grammarName)) != null ? _ref.getRepository()[ruleName] : void 0; | ||
} else if (name === '$self') { | ||
return this.grammar.getInitialRule(); | ||
} else if (name === "$base") { | ||
} else if (name === '$base') { | ||
return baseGrammar.getInitialRule(); | ||
} else { | ||
this.grammar.addIncludedGrammarScope(name); | ||
return (_ref = this.registry.grammarForScopeName(name)) != null ? _ref.getInitialRule() : void 0; | ||
return (_ref1 = this.registry.grammarForScopeName(name)) != null ? _ref1.getInitialRule() : void 0; | ||
} | ||
@@ -166,0 +172,0 @@ }; |
{ | ||
"name": "first-mate", | ||
"version": "4.1.8", | ||
"version": "4.2.0", | ||
"description": "TextMate helpers", | ||
@@ -5,0 +5,0 @@ "main": "./lib/first-mate.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
652669
16426