KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

375 lines
20KB

  1. <?php
  2. /*************************************************************************************
  3. * go.php
  4. * --------
  5. * Author: Markus Jarderot (mizardx at gmail dot com)
  6. * Copyright: (c) 2010 Markus Jarderot
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2010/05/20
  9. *
  10. * Go language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2010/05/20 (1.0.8.9)
  15. * - First Release
  16. *
  17. * TODO (updated 2010/05/20)
  18. * -------------------------
  19. *
  20. *************************************************************************************
  21. *
  22. * This file is part of GeSHi.
  23. *
  24. * GeSHi is free software; you can redistribute it and/or modify
  25. * it under the terms of the GNU General Public License as published by
  26. * the Free Software Foundation; either version 2 of the License, or
  27. * (at your option) any later version.
  28. *
  29. * GeSHi is distributed in the hope that it will be useful,
  30. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  31. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  32. * GNU General Public License for more details.
  33. *
  34. * You should have received a copy of the GNU General Public License
  35. * along with GeSHi; if not, write to the Free Software
  36. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  37. *
  38. ************************************************************************************/
  39. $language_data = array(
  40. 'LANG_NAME' => 'Go',
  41. 'COMMENT_SINGLE' => array(1 => '//'),
  42. 'COMMENT_MULTI' => array('/*' => '*/'),
  43. 'COMMENT_REGEXP' => array(
  44. # Raw strings (escapes and linebreaks ignored)
  45. 2 => "#`[^`]*`#"
  46. ),
  47. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  48. 'QUOTEMARKS' => array('"', "'"),
  49. 'ESCAPE_CHAR' => '',
  50. 'ESCAPE_REGEXP' => array(
  51. 1 => "#\\\\[abfnrtv\\\\\'\"]#",
  52. 2 => "#\\\\[0-7]{3}#",
  53. 3 => "#\\\\x[0-9a-fA-F]{2}#",
  54. 4 => "#\\\\u[0-9a-fA-F]{4}#",
  55. 5 => "#\\\\U[0-9a-fA-F]{8}#"
  56. ),
  57. 'NUMBERS' => array(
  58. # integer literals (possibly imaginary)
  59. 0 => '\b([1-9][0-9]*i?|0[0-7]*|0[xX][0-9a-f]+|0[0-9]*i)\b',
  60. # real floating point literals
  61. 1 => '\b((?:\d+\.\d*(?:[Ee][+-]?\d+\b)?|\.\d+(?:[Ee][+-]?\d+)?|\d+[Ee][+-]?\d+)?)\b',
  62. # imaginary floating point literals
  63. 2 => '\b((?:\d+\.\d*(?:[Ee][+-]?\d+)?|\.\d+(?:[Ee][+-]?\d+)?|\d+[Ee][+-]?\d+)?i)\b'
  64. ),
  65. 'KEYWORDS' => array(
  66. # statements
  67. 1 => array(
  68. 'break', 'case', 'const', 'continue', 'default', 'defer', 'else',
  69. 'fallthrough', 'for', 'go', 'goto', 'if', 'import', 'package',
  70. 'range', 'return', 'select', 'switch', 'type', 'var'
  71. ),
  72. # literals
  73. 2 => array(
  74. 'nil', 'true', 'false'
  75. ),
  76. # built-in functions
  77. 3 => array(
  78. 'close', 'closed', 'len', 'cap', 'new', 'make', 'copy', 'cmplx',
  79. 'real', 'imag', 'panic', 'recover', 'print', 'println'
  80. ),
  81. # built-in types
  82. 4 => array(
  83. 'chan', 'func', 'interface', 'map', 'struct', 'bool', 'uint8',
  84. 'uint16', 'uint32', 'uint64', 'int8', 'int16', 'int32', 'int64',
  85. 'float32', 'float64', 'complex64', 'complex128', 'byte', 'uint',
  86. 'int', 'float', 'complex', 'uintptr', 'string'
  87. ),
  88. # library types
  89. 5 => array(
  90. 'aes.Cipher', 'aes.KeySizeError', 'ascii85.CorruptInputError', 'asn1.BitString',
  91. 'asn1.RawValue', 'asn1.StructuralError', 'asn1.SyntaxError', 'ast.ChanDir',
  92. 'ast.Comment', 'ast.CommentGroup', 'ast.Decl', 'ast.Expr', 'ast.Field',
  93. 'ast.FieldList', 'ast.File', 'ast.Filter', 'ast.MergeMode', 'ast.Node',
  94. 'ast.ObjKind', 'ast.Object', 'ast.Package', 'ast.Scope', 'ast.Stmt',
  95. 'ast.Visitor', 'av.Color', 'av.Image', 'av.Window', 'base64.CorruptInputError',
  96. 'base64.Encoding', 'big.Int', 'big.Word', 'bignum.Integer', 'bignum.Rational',
  97. 'binary.ByteOrder', 'block.Cipher', 'block.EAXTagError', 'blowfish.Cipher',
  98. 'blowfish.KeySizeError', 'bufio.BufSizeError', 'bufio.Error', 'bufio.ReadWriter',
  99. 'bufio.Reader', 'bufio.Writer', 'bytes.Buffer', 'datafmt.Environment',
  100. 'datafmt.Format', 'datafmt.Formatter', 'datafmt.FormatterMap', 'datafmt.State',
  101. 'doc.Filter', 'doc.FuncDoc', 'doc.PackageDoc', 'doc.TypeDoc', 'doc.ValueDoc',
  102. 'draw.Color', 'draw.Context', 'draw.Image', 'draw.Mouse', 'draw.Op',
  103. 'draw.Point', 'draw.Rectangle', 'dwarf.AddrType', 'dwarf.ArrayType',
  104. 'dwarf.Attr', 'dwarf.BasicType', 'dwarf.BoolType', 'dwarf.CharType',
  105. 'dwarf.CommonType', 'dwarf.ComplexType', 'dwarf.Data', 'dwarf.DecodeError',
  106. 'dwarf.DotDotDotType', 'dwarf.Entry', 'dwarf.EnumType', 'dwarf.EnumValue',
  107. 'dwarf.Field', 'dwarf.FloatType', 'dwarf.FuncType', 'dwarf.IntType',
  108. 'dwarf.Offset', 'dwarf.PtrType', 'dwarf.QualType', 'dwarf.Reader',
  109. 'dwarf.StructField', 'dwarf.StructType', 'dwarf.Tag', 'dwarf.Type',
  110. 'dwarf.TypedefType', 'dwarf.UcharType', 'dwarf.UintType', 'dwarf.VoidType',
  111. 'elf.Class', 'elf.Data', 'elf.Dyn32', 'elf.Dyn64', 'elf.DynFlag', 'elf.DynTag',
  112. 'elf.File', 'elf.FileHeader', 'elf.FormatError', 'elf.Header32', 'elf.Header64',
  113. 'elf.Machine', 'elf.NType', 'elf.OSABI', 'elf.Prog', 'elf.Prog32', 'elf.Prog64',
  114. 'elf.ProgFlag', 'elf.ProgHeader', 'elf.ProgType', 'elf.R_386', 'elf.R_ALPHA',
  115. 'elf.R_ARM', 'elf.R_PPC', 'elf.R_SPARC', 'elf.R_X86_64', 'elf.Rel32',
  116. 'elf.Rel64', 'elf.Rela32', 'elf.Rela64', 'elf.Section', 'elf.Section32',
  117. 'elf.Section64', 'elf.SectionFlag', 'elf.SectionHeader', 'elf.SectionIndex',
  118. 'elf.SectionType', 'elf.Sym32', 'elf.Sym64', 'elf.SymBind', 'elf.SymType',
  119. 'elf.SymVis', 'elf.Symbol', 'elf.Type', 'elf.Version', 'eval.ArrayType',
  120. 'eval.ArrayValue', 'eval.BoolValue', 'eval.BoundedType', 'eval.ChanType',
  121. 'eval.Code', 'eval.Constant', 'eval.Def', 'eval.DivByZeroError',
  122. 'eval.FloatValue', 'eval.Frame', 'eval.Func', 'eval.FuncDecl', 'eval.FuncType',
  123. 'eval.FuncValue', 'eval.IMethod', 'eval.IdealFloatValue', 'eval.IdealIntValue',
  124. 'eval.IndexError', 'eval.IntValue', 'eval.Interface', 'eval.InterfaceType',
  125. 'eval.InterfaceValue', 'eval.KeyError', 'eval.Map', 'eval.MapType',
  126. 'eval.MapValue', 'eval.Method', 'eval.MultiType', 'eval.NamedType',
  127. 'eval.NegativeCapacityError', 'eval.NegativeLengthError', 'eval.NilPointerError',
  128. 'eval.PtrType', 'eval.PtrValue', 'eval.RedefinitionError', 'eval.Scope',
  129. 'eval.Slice', 'eval.SliceError', 'eval.SliceType', 'eval.SliceValue',
  130. 'eval.StringValue', 'eval.StructField', 'eval.StructType', 'eval.StructValue',
  131. 'eval.Thread', 'eval.Type', 'eval.UintValue', 'eval.Value', 'eval.Variable',
  132. 'eval.World', 'exec.Cmd', 'expvar.Int', 'expvar.IntFunc', 'expvar.KeyValue',
  133. 'expvar.Map', 'expvar.String', 'expvar.StringFunc', 'expvar.Var', 'flag.Flag',
  134. 'flag.Value', 'flate.CorruptInputError', 'flate.InternalError',
  135. 'flate.ReadError', 'flate.Reader', 'flate.WriteError', 'flate.WrongValueError',
  136. 'fmt.Formatter', 'fmt.GoStringer', 'fmt.State', 'fmt.Stringer',
  137. 'git85.CorruptInputError', 'gob.Decoder', 'gob.Encoder', 'gosym.DecodingError',
  138. 'gosym.Func', 'gosym.LineTable', 'gosym.Obj', 'gosym.Sym', 'gosym.Table',
  139. 'gosym.UnknownFileError', 'gosym.UnknownLineError', 'gzip.Deflater',
  140. 'gzip.Header', 'gzip.Inflater', 'hash.Hash', 'hash.Hash32', 'hash.Hash64',
  141. 'heap.Interface', 'hex.InvalidHexCharError', 'hex.OddLengthInputError',
  142. 'http.ClientConn', 'http.Conn', 'http.Handler', 'http.HandlerFunc',
  143. 'http.ProtocolError', 'http.Request', 'http.Response', 'http.ServeMux',
  144. 'http.ServerConn', 'http.URL', 'http.URLError', 'http.URLEscapeError',
  145. 'image.Alpha', 'image.AlphaColor', 'image.Color', 'image.ColorImage',
  146. 'image.ColorModel', 'image.ColorModelFunc', 'image.Image', 'image.NRGBA',
  147. 'image.NRGBA64', 'image.NRGBA64Color', 'image.NRGBAColor', 'image.Paletted',
  148. 'image.RGBA', 'image.RGBA64', 'image.RGBA64Color', 'image.RGBAColor',
  149. 'io.Closer', 'io.Error', 'io.PipeReader', 'io.PipeWriter', 'io.ReadByter',
  150. 'io.ReadCloser', 'io.ReadSeeker', 'io.ReadWriteCloser', 'io.ReadWriteSeeker',
  151. 'io.ReadWriter', 'io.Reader', 'io.ReaderAt', 'io.ReaderFrom', 'io.SectionReader',
  152. 'io.Seeker', 'io.WriteCloser', 'io.WriteSeeker', 'io.Writer', 'io.WriterAt',
  153. 'io.WriterTo', 'iterable.Func', 'iterable.Group', 'iterable.Grouper',
  154. 'iterable.Injector', 'iterable.Iterable', 'jpeg.FormatError', 'jpeg.Reader',
  155. 'jpeg.UnsupportedError', 'json.Decoder', 'json.Encoder',
  156. 'json.InvalidUnmarshalError', 'json.Marshaler', 'json.MarshalerError',
  157. 'json.SyntaxError', 'json.UnmarshalTypeError', 'json.Unmarshaler',
  158. 'json.UnsupportedTypeError', 'list.Element', 'list.List', 'log.Logger',
  159. 'macho.Cpu', 'macho.File', 'macho.FileHeader', 'macho.FormatError', 'macho.Load',
  160. 'macho.LoadCmd', 'macho.Regs386', 'macho.RegsAMD64', 'macho.Section',
  161. 'macho.Section32', 'macho.Section64', 'macho.SectionHeader', 'macho.Segment',
  162. 'macho.Segment32', 'macho.Segment64', 'macho.SegmentHeader', 'macho.Thread',
  163. 'macho.Type', 'net.Addr', 'net.AddrError', 'net.Conn', 'net.DNSConfigError',
  164. 'net.DNSError', 'net.Error', 'net.InvalidAddrError', 'net.InvalidConnError',
  165. 'net.Listener', 'net.OpError', 'net.PacketConn', 'net.TCPAddr', 'net.TCPConn',
  166. 'net.TCPListener', 'net.UDPAddr', 'net.UDPConn', 'net.UnixAddr', 'net.UnixConn',
  167. 'net.UnixListener', 'net.UnknownNetworkError', 'net.UnknownSocketError',
  168. 'netchan.Dir', 'netchan.Exporter', 'netchan.Importer', 'nntp.Article',
  169. 'nntp.Conn', 'nntp.Error', 'nntp.Group', 'nntp.ProtocolError', 'ogle.Arch',
  170. 'ogle.ArchAlignedMultiple', 'ogle.ArchLSB', 'ogle.Breakpoint', 'ogle.Event',
  171. 'ogle.EventAction', 'ogle.EventHandler', 'ogle.EventHook', 'ogle.FormatError',
  172. 'ogle.Frame', 'ogle.Goroutine', 'ogle.GoroutineCreate', 'ogle.GoroutineExit',
  173. 'ogle.NoCurrentGoroutine', 'ogle.NotOnStack', 'ogle.Process',
  174. 'ogle.ProcessNotStopped', 'ogle.ReadOnlyError', 'ogle.RemoteMismatchError',
  175. 'ogle.UnknownArchitecture', 'ogle.UnknownGoroutine', 'ogle.UsageError',
  176. 'os.Errno', 'os.Error', 'os.ErrorString', 'os.File', 'os.FileInfo',
  177. 'os.LinkError', 'os.PathError', 'os.SyscallError', 'os.Waitmsg', 'patch.Diff',
  178. 'patch.File', 'patch.GitBinaryLiteral', 'patch.Op', 'patch.Set',
  179. 'patch.SyntaxError', 'patch.TextChunk', 'patch.Verb', 'path.Visitor',
  180. 'pdp1.HaltError', 'pdp1.LoopError', 'pdp1.Trapper', 'pdp1.UnknownInstrError',
  181. 'pdp1.Word', 'pem.Block', 'png.FormatError', 'png.IDATDecodingError',
  182. 'png.UnsupportedError', 'printer.Config', 'printer.HTMLTag', 'printer.Styler',
  183. 'proc.Breakpoint', 'proc.Cause', 'proc.Process', 'proc.ProcessExited',
  184. 'proc.Regs', 'proc.Signal', 'proc.Stopped', 'proc.Thread', 'proc.ThreadCreate',
  185. 'proc.ThreadExit', 'proc.Word', 'quick.CheckEqualError', 'quick.CheckError',
  186. 'quick.Config', 'quick.Generator', 'quick.SetupError', 'rand.Rand',
  187. 'rand.Source', 'rand.Zipf', 'rc4.Cipher', 'rc4.KeySizeError',
  188. 'reflect.ArrayOrSliceType', 'reflect.ArrayOrSliceValue', 'reflect.ArrayType',
  189. 'reflect.ArrayValue', 'reflect.BoolType', 'reflect.BoolValue', 'reflect.ChanDir',
  190. 'reflect.ChanType', 'reflect.ChanValue', 'reflect.Complex128Type',
  191. 'reflect.Complex128Value', 'reflect.Complex64Type', 'reflect.Complex64Value',
  192. 'reflect.ComplexType', 'reflect.ComplexValue', 'reflect.Float32Type',
  193. 'reflect.Float32Value', 'reflect.Float64Type', 'reflect.Float64Value',
  194. 'reflect.FloatType', 'reflect.FloatValue', 'reflect.FuncType',
  195. 'reflect.FuncValue', 'reflect.Int16Type', 'reflect.Int16Value',
  196. 'reflect.Int32Type', 'reflect.Int32Value', 'reflect.Int64Type',
  197. 'reflect.Int64Value', 'reflect.Int8Type', 'reflect.Int8Value', 'reflect.IntType',
  198. 'reflect.IntValue', 'reflect.InterfaceType', 'reflect.InterfaceValue',
  199. 'reflect.MapType', 'reflect.MapValue', 'reflect.Method', 'reflect.PtrType',
  200. 'reflect.PtrValue', 'reflect.SliceHeader', 'reflect.SliceType',
  201. 'reflect.SliceValue', 'reflect.StringHeader', 'reflect.StringType',
  202. 'reflect.StringValue', 'reflect.StructField', 'reflect.StructType',
  203. 'reflect.StructValue', 'reflect.Type', 'reflect.Uint16Type',
  204. 'reflect.Uint16Value', 'reflect.Uint32Type', 'reflect.Uint32Value',
  205. 'reflect.Uint64Type', 'reflect.Uint64Value', 'reflect.Uint8Type',
  206. 'reflect.Uint8Value', 'reflect.UintType', 'reflect.UintValue',
  207. 'reflect.UintptrType', 'reflect.UintptrValue', 'reflect.UnsafePointerType',
  208. 'reflect.UnsafePointerValue', 'reflect.Value', 'regexp.Error', 'regexp.Regexp',
  209. 'ring.Ring', 'rpc.Call', 'rpc.Client', 'rpc.ClientCodec', 'rpc.InvalidRequest',
  210. 'rpc.Request', 'rpc.Response', 'rpc.ServerCodec', 'rsa.DecryptionError',
  211. 'rsa.MessageTooLongError', 'rsa.PKCS1v15Hash', 'rsa.PrivateKey', 'rsa.PublicKey',
  212. 'rsa.VerificationError', 'runtime.ArrayType', 'runtime.BoolType',
  213. 'runtime.ChanDir', 'runtime.ChanType', 'runtime.Complex128Type',
  214. 'runtime.Complex64Type', 'runtime.ComplexType', 'runtime.Error',
  215. 'runtime.Float32Type', 'runtime.Float64Type', 'runtime.FloatType',
  216. 'runtime.Func', 'runtime.FuncType', 'runtime.Int16Type', 'runtime.Int32Type',
  217. 'runtime.Int64Type', 'runtime.Int8Type', 'runtime.IntType',
  218. 'runtime.InterfaceType', 'runtime.Itable', 'runtime.MapType',
  219. 'runtime.MemProfileRecord', 'runtime.MemStatsType', 'runtime.PtrType',
  220. 'runtime.SliceType', 'runtime.StringType', 'runtime.StructType', 'runtime.Type',
  221. 'runtime.TypeAssertionError', 'runtime.Uint16Type', 'runtime.Uint32Type',
  222. 'runtime.Uint64Type', 'runtime.Uint8Type', 'runtime.UintType',
  223. 'runtime.UintptrType', 'runtime.UnsafePointerType', 'scanner.Error',
  224. 'scanner.ErrorHandler', 'scanner.ErrorVector', 'scanner.Position',
  225. 'scanner.Scanner', 'script.Close', 'script.Closed', 'script.Event',
  226. 'script.ReceivedUnexpected', 'script.Recv', 'script.RecvMatch', 'script.Send',
  227. 'script.SetupError', 'signal.Signal', 'signal.UnixSignal', 'sort.Interface',
  228. 'srpc.Client', 'srpc.Errno', 'srpc.Handler', 'srpc.RPC', 'strconv.NumError',
  229. 'strings.Reader', 'sync.Mutex', 'sync.RWMutex',
  230. 'syscall.ByHandleFileInformation', 'syscall.Cmsghdr', 'syscall.Dirent',
  231. 'syscall.EpollEvent', 'syscall.Fbootstraptransfer_t', 'syscall.FdSet',
  232. 'syscall.Filetime', 'syscall.Flock_t', 'syscall.Fstore_t', 'syscall.Iovec',
  233. 'syscall.Kevent_t', 'syscall.Linger', 'syscall.Log2phys_t', 'syscall.Msghdr',
  234. 'syscall.Overlapped', 'syscall.PtraceRegs', 'syscall.Radvisory_t',
  235. 'syscall.RawSockaddr', 'syscall.RawSockaddrAny', 'syscall.RawSockaddrInet4',
  236. 'syscall.RawSockaddrInet6', 'syscall.RawSockaddrUnix', 'syscall.Rlimit',
  237. 'syscall.Rusage', 'syscall.Sockaddr', 'syscall.SockaddrInet4',
  238. 'syscall.SockaddrInet6', 'syscall.SockaddrUnix', 'syscall.Stat_t',
  239. 'syscall.Statfs_t', 'syscall.Sysinfo_t', 'syscall.Time_t', 'syscall.Timespec',
  240. 'syscall.Timeval', 'syscall.Timex', 'syscall.Tms', 'syscall.Ustat_t',
  241. 'syscall.Utimbuf', 'syscall.Utsname', 'syscall.WaitStatus',
  242. 'syscall.Win32finddata', 'syslog.Priority', 'syslog.Writer', 'tabwriter.Writer',
  243. 'tar.Header', 'tar.Reader', 'tar.Writer', 'template.Error',
  244. 'template.FormatterMap', 'template.Template', 'testing.Benchmark',
  245. 'testing.Regexp', 'testing.Test', 'time.ParseError', 'time.Ticker', 'time.Time',
  246. 'tls.CASet', 'tls.Certificate', 'tls.Config', 'tls.Conn', 'tls.ConnectionState',
  247. 'tls.Listener', 'token.Position', 'token.Token', 'unicode.CaseRange',
  248. 'unicode.Range', 'unsafe.ArbitraryType', 'vector.LessInterface',
  249. 'websocket.Conn', 'websocket.Draft75Handler', 'websocket.Handler',
  250. 'websocket.ProtocolError', 'websocket.WebSocketAddr', 'x509.Certificate',
  251. 'x509.ConstraintViolationError', 'x509.KeyUsage', 'x509.Name',
  252. 'x509.PublicKeyAlgorithm', 'x509.SignatureAlgorithm',
  253. 'x509.UnhandledCriticalExtension', 'x509.UnsupportedAlgorithmError', 'xml.Attr',
  254. 'xml.EndElement', 'xml.Name', 'xml.Parser', 'xml.ProcInst', 'xml.StartElement',
  255. 'xml.SyntaxError', 'xml.Token', 'xml.UnmarshalError', 'xtea.Cipher',
  256. 'xtea.KeySizeError'
  257. )
  258. ),
  259. 'SYMBOLS' => array(
  260. # delimiters
  261. 1 => array(
  262. '(', ')', '{', '}', '[', ']', ',', ':', ';'
  263. ),
  264. # assignments
  265. 2 => array(
  266. '<<=', '!=', '%=', '&=', '&^=', '*=', '+=', '-=', '/=', ':=', '>>=',
  267. '^=', '|=', '=', '++', '--'
  268. ),
  269. # operators
  270. 3 => array(
  271. '<=', '<', '==', '>', '>=', '&&', '!', '||', '&', '&^', '|', '^',
  272. '>>', '<<', '*', '%', '+', '-', '.', '/', '<-'),
  273. # vararg
  274. 4 => array(
  275. '...'
  276. )
  277. ),
  278. 'CASE_SENSITIVE' => array(
  279. GESHI_COMMENTS => false,
  280. 1 => true,
  281. 2 => true,
  282. 3 => true,
  283. 4 => true,
  284. 5 => true
  285. ),
  286. 'STYLES' => array(
  287. 'KEYWORDS' => array(
  288. # statements
  289. 1 => 'color: #b1b100; font-weight: bold;',
  290. # literals
  291. 2 => 'color: #000000; font-weight: bold;',
  292. # built-in functions
  293. 3 => 'color: #000066;',
  294. # built-in types
  295. 4 => 'color: #993333;',
  296. # library types
  297. 5 => 'color: #003399;'
  298. ),
  299. 'COMMENTS' => array(
  300. # single-line comments
  301. 1 => 'color: #666666; font-style: italic;',
  302. # raw strings
  303. 2 => 'color: #0000ff;',
  304. # multi-line comments
  305. 'MULTI' => 'color: #666666; font-style: italic;'
  306. ),
  307. 'ESCAPE_CHAR' => array(
  308. # simple escape
  309. 1 => 'color: #000099; font-weight: bold;',
  310. # octal escape
  311. 2 => 'color: #000099;',
  312. # hex escape
  313. 3 => 'color: #000099;',
  314. # unicode escape
  315. 4 => 'color: #000099;',
  316. # long unicode escape
  317. 5 => 'color: #000099;'
  318. ),
  319. 'BRACKETS' => array(
  320. ),
  321. 'STRINGS' => array(
  322. 0 => 'color: #0000ff;',
  323. 0 => 'color: #cc66cc;'
  324. ),
  325. 'NUMBERS' => array(
  326. 0 => 'color: #cc66cc;'
  327. ),
  328. 'METHODS' => array(
  329. 0 => 'color: #004000;'
  330. ),
  331. 'SYMBOLS' => array(
  332. # delimiters
  333. 1 => 'color: #339933;',
  334. # assignments
  335. 2 => 'color: #339933;',
  336. # operators
  337. 3 => 'color: #339933;',
  338. # vararg (highlighted as a keyword)
  339. 4 => 'color: #000000; font-weight: bold;'
  340. ),
  341. 'REGEXPS' => array(
  342. # If CSS classes are enabled, these would be highlighted as numbers (nu0)
  343. # integer literals (possibly imaginary)
  344. //0 => 'color: #cc66cc;',
  345. # real floating point literals
  346. //1 => 'color: #cc66cc;',
  347. # imaginary floating point literals
  348. //2 => 'color: #cc66cc;'
  349. ),
  350. 'SCRIPT' => array(
  351. )
  352. ),
  353. 'URLS' => array(
  354. 1 => '',
  355. 2 => '',
  356. 3 => '',
  357. 4 => '',
  358. 5 => 'http://golang.org/search?q={FNAME}'
  359. ),
  360. 'REGEXPS' => array(
  361. ),
  362. 'OOLANG' => true,
  363. 'OBJECT_SPLITTERS' => array(1 => '.'),
  364. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  365. 'SCRIPT_DELIMITERS' => array(),
  366. 'HIGHLIGHT_STRICT_BLOCK' => array(),
  367. 'PARSER_CONTROL' => array(
  368. 'ENABLE_FLAGS' => array(
  369. 'BRACKETS' => GESHI_NEVER, # handled by symbols
  370. )
  371. )
  372. );
  373. ?>