@@ -8,17 +8,17 @@ module Scanners
8
8
# The language’s complete syntax is defined in
9
9
# {the Lua manual}[http://www.lua.org/manual/5.2/manual.html],
10
10
# which is what this scanner tries to conform to.
11
- class CodeRay :: Scanners :: Lua < CodeRay :: Scanners :: Scanner
11
+ class Lua < Scanner
12
12
13
13
register_for :lua
14
- file_extension " lua"
15
- title " Lua"
14
+ file_extension ' lua'
15
+ title ' Lua'
16
16
17
17
# Keywords used in Lua.
18
18
KEYWORDS = %w[ and break do else elseif end
19
- for function goto if in
20
- local not or repeat return
21
- then until while
19
+ for function goto if in
20
+ local not or repeat return
21
+ then until while
22
22
]
23
23
24
24
# Constants set by the Lua core.
@@ -36,10 +36,10 @@ class CodeRay::Scanners::Lua < CodeRay::Scanners::Scanner
36
36
# highlighted directly accordingly, without the need for specific
37
37
# identifiers to be listed here.
38
38
PREDEFINED_EXPRESSIONS = %w[
39
- assert collectgarbage dofile error getmetatable
40
- ipairs load loadfile next pairs pcall print
41
- rawequal rawget rawlen rawset select setmetatable
42
- tonumber tostring type xpcall
39
+ assert collectgarbage dofile error getmetatable
40
+ ipairs load loadfile next pairs pcall print
41
+ rawequal rawget rawlen rawset select setmetatable
42
+ tonumber tostring type xpcall
43
43
]
44
44
45
45
# Automatic token kind selection for normal words.
@@ -52,7 +52,7 @@ class CodeRay::Scanners::Lua < CodeRay::Scanners::Scanner
52
52
53
53
# Scanner initialization.
54
54
def setup
55
- @state = :initial
55
+ @state = :initial
56
56
@brace_depth = 0
57
57
end
58
58
0 commit comments