prettify.lang
Class LangGo
java.lang.Object
prettify.lang.Lang
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LangGo
public LangGo()
getFileExtensions
public static java.util.List<java.lang.String> getFileExtensions()