mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Add legacy ‘Syntax’ deserializer for GrammarRegistry
This commit is contained in:
@@ -20,13 +20,15 @@ module.exports =
|
||||
class GrammarRegistry extends FirstMate.GrammarRegistry
|
||||
PropertyAccessors.includeInto(this)
|
||||
Subscriber.includeInto(this)
|
||||
atom.deserializers.add(this)
|
||||
|
||||
@deserialize: ({grammarOverridesByPath}) ->
|
||||
grammarRegistry = new GrammarRegistry()
|
||||
grammarRegistry.grammarOverridesByPath = grammarOverridesByPath
|
||||
grammarRegistry
|
||||
|
||||
atom.deserializers.add(this)
|
||||
atom.deserializers.add(name: 'Syntax', deserialize: @deserialize) # Support old serialization
|
||||
|
||||
constructor: ->
|
||||
super(maxTokensPerLine: 100)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user