class Rugments::Lexers::Matlab

Public Class Methods

analyze_text(text) click to toggle source
# File lib/rugments/lexers/matlab.rb, line 11
def self.analyze_text(text)
  return 0.4 if text.match(/^\s*% /) # % comments are a dead giveaway
end
builtins() click to toggle source
# File lib/rugments/lexers/matlab.rb, line 22
def self.builtins
  load Pathname.new(__FILE__).dirname.join('matlab/builtins.rb')
  builtins
end
keywords() click to toggle source
# File lib/rugments/lexers/matlab.rb, line 15
def self.keywords
  @keywords = Set.new %w(
    break case catch classdef continue else elseif end for function
    global if otherwise parfor persistent return spmd switch try while
  )
end