From e6bffc5e7a6f8469afe3b2f065fa0d748265aa2f Mon Sep 17 00:00:00 2001 From: Drew Blessing Date: Fri, 10 Aug 2018 15:19:07 -0500 Subject: [PATCH] Minor changes to SQF --- lib/rouge/lexers/sqf.rb | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/lib/rouge/lexers/sqf.rb b/lib/rouge/lexers/sqf.rb index 91245349cb..b171d1c5d6 100644 --- a/lib/rouge/lexers/sqf.rb +++ b/lib/rouge/lexers/sqf.rb @@ -10,40 +10,40 @@ class SQF < RegexLexer desc "Status Quo Function, a Real Virtuality engine scripting language" def self.wordoperators - @wordoperators = Set.new %w( + @wordoperators ||= Set.new %w( and or not ) end def self.initializers - @initializers = Set.new %w( + @initializers ||= Set.new %w( private param params ) end def self.controlflow - @controlflow = Set.new %w( + @controlflow ||= Set.new %w( if then else exitwith switch do case default while for from to step foreach ) end def self.constants - @constants = Set.new %w( + @constants ||= Set.new %w( true false player confignull controlnull displaynull grpnull locationnull netobjnull objnull scriptnull tasknull teammembernull ) end def self.namespaces - @namespaces = Set.new %w( + @namespaces ||= Set.new %w( currentnamespace missionnamespace parsingnamespace profilenamespace uinamespace ) end def self.diag_commands - @diag_commands = Set.new %w( + @diag_commands ||= Set.new %w( diag_activemissionfsms diag_activesqfscripts diag_activesqsscripts diag_activescripts diag_captureframe diag_captureframetofile diag_captureslowframe diag_codeperformance diag_drawmode diag_enable @@ -58,10 +58,6 @@ def self.commands @commands = self.commands end - def self.detect?(text) - false - end - state :root do # Whitespace rule %r"\s+", Text @@ -107,7 +103,6 @@ def self.detect?(text) end end end - end end end