class Rouge::Lexers::SML
def self.analyze_text(text)
def self.analyze_text(text) return 0 end
def self.keywords
def self.keywords @keywords ||= Set.new %w( abstype and andalso as case datatype do else end exception fn fun handle if in infix infixr let local nonfix of op open orelse raise rec then type val with withtype while eqtype functor include sharing sig signature struct structure where ) end
def self.symbolic_reserved
def self.symbolic_reserved @symbolic_reserved ||= Set.new %w(: | = => -> # :>) end
def token_for_final_id(id)
def token_for_final_id(id) if self.class.keywords.include? id or self.class.symbolic_reserved.include? id Error else Name end end
def token_for_id(id)
def token_for_id(id) if self.class.keywords.include? id Keyword::Reserved elsif self.class.symbolic_reserved.include? id Punctuation else Name end end
def token_for_id_with_dot(id)
def token_for_id_with_dot(id) if self.class.keywords.include? id Error else Name::Namespace end end