Files
atom/src/app/null-grammar.coffee
Nathan Sobo 93910201b0 Re-tokenize buffer when its grammar is updated
This can happen if a grammar that the grammar includes is added or
removed from the syntax global.
2013-04-22 11:34:03 -06:00

21 lines
413 B
CoffeeScript

Token = require 'token'
EventEmitter = require 'event-emitter'
_ = require 'underscore'
###
# Internal #
###
module.exports =
class NullGrammar
name: 'Null Grammar'
scopeName: 'text.plain.null-grammar'
getScore: -> 0
tokenizeLine: (line) ->
{ tokens: [new Token(value: line, scopes: ['null-grammar.text.plain'])] }
grammarAddedOrRemoved: -> # no op
_.extend NullGrammar.prototype, EventEmitter