LangGo

class LangGo : 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

Constructors

Link copied to clipboard
fun LangGo()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun getFileExtensions(): List<String>