prettify.lang
Class LangGo

java.lang.Object
  extended by prettify.lang.Lang
      extended by prettify.lang.LangGo

public class LangGo
extends Lang

This is similar to the lang-go.js in JavaScript Prettify. All comments are adapted from the JavaScript Prettify.

Registers a language handler for the Go language..

Based on the lexical grammar at http://golang.org/doc/go_spec.html#Lexical_elements

Go uses a minimal style for highlighting so the below does not distinguish strings, keywords, literals, etc. by design. From a discussion with the Go designers:

 On Thursday, July 22, 2010, Mike Samuel <...> wrote:
 > On Thu, Jul 22, 2010, Rob 'Commander' Pike <...> wrote:
 >> Personally, I would vote for the subdued style godoc presents at http://golang.org
 >>
 >> Not as fancy as some like, but a case can be made it's the official style.
 >> If people want more colors, I wouldn't fight too hard, in the interest of
 >> encouragement through familiarity, but even then I would ask to shy away
 >> from technicolor starbursts.
 >
 > Like http://golang.org/pkg/go/scanner/ where comments are blue and all
 > other content is black?  I can do that.
 

Author:
mikesamuel@gmail.com

Field Summary
 
Fields inherited from class prettify.lang.Lang
extendedLangs, fallthroughStylePatterns, shortcutStylePatterns
 
Constructor Summary
LangGo()
           
 
Method Summary
static java.util.List<java.lang.String> getFileExtensions()
           
 
Methods inherited from class prettify.lang.Lang
getExtendedLangs, getFallthroughStylePatterns, getShortcutStylePatterns, setExtendedLangs, setFallthroughStylePatterns, setShortcutStylePatterns
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LangGo

public LangGo()
Method Detail

getFileExtensions

public static java.util.List<java.lang.String> getFileExtensions()