lib/rouge/lexers/sml.rb in rouge-2.0.7 vs lib/rouge/lexers/sml.rb in rouge-2.1.0

- old
+ new

@@ -39,11 +39,12 @@ state :delimiters do rule /[(\[{]/, Punctuation, :main rule /[)\]}]/, Punctuation, :pop! - rule /\b(let|if|local)\b(?!')/, Keyword::Reserved do + rule /\b(let|if|local)\b(?!')/ do + token Keyword::Reserved push; push end rule /\b(struct|sig|while)\b(?!')/ do token Keyword::Reserved @@ -188,10 +189,10 @@ rule /"/, Str::Char, :pop! mixin :has_escapes end state :breakout do - rule /(?=\w+\b(#{SML.keywords.to_a.join('|')})\b(?!'))/ do + rule /(?=\b(#{SML.keywords.to_a.join('|')})\b(?!'))/ do pop! end end state :sname do