Skip to content

Commit

Permalink
Merge pull request rouge-ruby#970 from dblessing/sqf_minor_fixes
Browse files Browse the repository at this point in the history
Minor changes to SQF
  • Loading branch information
dblessing authored Aug 10, 2018
2 parents ee66b98 + e6bffc5 commit 7f027b1
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions lib/rouge/lexers/sqf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -107,7 +103,6 @@ def self.detect?(text)
end
end
end

end
end
end

0 comments on commit 7f027b1

Please sign in to comment.