We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cad9a00 commit 4c877bfCopy full SHA for 4c877bf
lib/coderay/scanners/go.rb
@@ -31,6 +31,11 @@ class Go < Scanner
31
'nil', 'iota',
32
'true', 'false',
33
] # :nodoc:
34
+
35
+ PREDEFINED_FUNCTIONS = %w[
36
+ append cap close complex copy delete imag len
37
+ make new panic print println real recover
38
+ ] # :nodoc:
39
40
DIRECTIVES = [
41
'go_no_directive', # Seems no directive concept in Go?
@@ -40,7 +45,8 @@ class Go < Scanner
45
add(KEYWORDS, :keyword).
46
add(PREDEFINED_TYPES, :predefined_type).
42
47
add(DIRECTIVES, :directive).
43
- add(PREDEFINED_CONSTANTS, :predefined_constant) # :nodoc:
48
+ add(PREDEFINED_CONSTANTS, :predefined_constant).
49
+ add(PREDEFINED_FUNCTIONS, :predefined) # :nodoc:
44
50
51
ESCAPE = / [rbfntv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x # :nodoc:
52
UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x # :nodoc:
0 commit comments