summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2013-06-23 01:17:49 +0200
committerKornelius Kalnbach <murphy@rubychan.de>2013-06-23 01:17:49 +0200
commit90c401c9001e0a670360a55d1189e9f814ae7592 (patch)
tree3210223dcdbbb23b0b63cd8803b080e52bab2400
parent06cf0bab5975bc9069f6859cf58eed117fd9f474 (diff)
downloadcoderay-lua-scanner.tar.gz
some more code cleanups before mergelua-scanner
-rw-r--r--lib/coderay/scanners/lua.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/coderay/scanners/lua.rb b/lib/coderay/scanners/lua.rb
index 3bee275..25bebbe 100644
--- a/lib/coderay/scanners/lua.rb
+++ b/lib/coderay/scanners/lua.rb
@@ -8,17 +8,17 @@ module Scanners
# The languageā€™s complete syntax is defined in
# {the Lua manual}[http://www.lua.org/manual/5.2/manual.html],
# which is what this scanner tries to conform to.
- class CodeRay::Scanners::Lua < CodeRay::Scanners::Scanner
+ class Lua < Scanner
register_for :lua
- file_extension "lua"
- title "Lua"
+ file_extension 'lua'
+ title 'Lua'
# Keywords used in Lua.
KEYWORDS = %w[and break do else elseif end
- for function goto if in
- local not or repeat return
- then until while
+ for function goto if in
+ local not or repeat return
+ then until while
]
# Constants set by the Lua core.
@@ -36,10 +36,10 @@ module Scanners
# highlighted directly accordingly, without the need for specific
# identifiers to be listed here.
PREDEFINED_EXPRESSIONS = %w[
- assert collectgarbage dofile error getmetatable
- ipairs load loadfile next pairs pcall print
- rawequal rawget rawlen rawset select setmetatable
- tonumber tostring type xpcall
+ assert collectgarbage dofile error getmetatable
+ ipairs load loadfile next pairs pcall print
+ rawequal rawget rawlen rawset select setmetatable
+ tonumber tostring type xpcall
]
# Automatic token kind selection for normal words.
@@ -52,7 +52,7 @@ module Scanners
# Scanner initialization.
def setup
- @state = :initial
+ @state = :initial
@brace_depth = 0
end