diff options
author | Nathan Youngman <git@nathany.com> | 2013-06-23 12:43:50 -0600 |
---|---|---|
committer | Nathan Youngman <git@nathany.com> | 2013-06-23 12:43:50 -0600 |
commit | 4c877bf0eb655cf2c04a0efb24b4e5f83b97e160 (patch) | |
tree | 4dbf8843b92bc0a149d1a606905c6d1a725c0db5 /lib/coderay/scanners/go.rb | |
parent | cad9a00e28d61781d5a12a0556be7126eb790725 (diff) | |
download | coderay-4c877bf0eb655cf2c04a0efb24b4e5f83b97e160.tar.gz |
predeclared identifiers
http://golang.org/ref/spec#Predeclared_identifiers
Diffstat (limited to 'lib/coderay/scanners/go.rb')
-rw-r--r-- | lib/coderay/scanners/go.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/coderay/scanners/go.rb b/lib/coderay/scanners/go.rb index 04504ab..ae50aa4 100644 --- a/lib/coderay/scanners/go.rb +++ b/lib/coderay/scanners/go.rb @@ -31,6 +31,11 @@ module Scanners 'nil', 'iota', 'true', 'false', ] # :nodoc: + + PREDEFINED_FUNCTIONS = %w[ + append cap close complex copy delete imag len + make new panic print println real recover + ] # :nodoc: DIRECTIVES = [ 'go_no_directive', # Seems no directive concept in Go? @@ -40,7 +45,8 @@ module Scanners add(KEYWORDS, :keyword). add(PREDEFINED_TYPES, :predefined_type). add(DIRECTIVES, :directive). - add(PREDEFINED_CONSTANTS, :predefined_constant) # :nodoc: + add(PREDEFINED_CONSTANTS, :predefined_constant). + add(PREDEFINED_FUNCTIONS, :predefined) # :nodoc: ESCAPE = / [rbfntv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x # :nodoc: UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x # :nodoc: |