lib/rouge/lexers/matlab.rb in rouge-3.17.0 vs lib/rouge/lexers/matlab.rb in rouge-3.18.0
- old
+ new
@@ -16,14 +16,13 @@
break case catch classdef continue else elseif end for function
global if otherwise parfor persistent return spmd switch try while
)
end
+ # self-modifying method that loads the builtins file
def self.builtins
- # Load Matlab keywords from separate YML file
- @builtins ||= ::YAML.load_file(File.join(__dir__, 'matlab/builtins.yml')).tap do |a|
- Set.new a
- end
+ load File.join(Lexers::BASE_DIR, 'matlab/builtins.rb')
+ builtins
end
state :root do
rule %r/\s+/m, Text # Whitespace
rule %r([{]%.*?%[}])m, Comment::Multiline