Add legacy ‘Syntax’ deserializer for GrammarRegistry

This commit is contained in:
Nathan Sobo 2014-11-20 15:28:37 -07:00
parent 9224c86452
commit 95d6ab1d4f

View File

@ -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)