Skip to content

Commit

Permalink
Add gololang support
Browse files Browse the repository at this point in the history
  • Loading branch information
k33g committed Feb 14, 2015
1 parent 1fb8b11 commit 9b1a9ea
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS.en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -157,3 +157,4 @@ Contributors:
- Peter Piwowarski <[email protected]>
- Kenta Sato <[email protected]>
- Anthony Scemama <[email protected]>
- Philippe Charrière <[email protected]>
1 change: 1 addition & 0 deletions AUTHORS.ru.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,4 @@ URL: https://highlightjs.org/
- Алексис Эно <[email protected]>
- Петер Пивоварски <[email protected]>
- Кента Сато <[email protected]>
- Филипп Шарьер <[email protected]>
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ New languages:

- *pf.conf* by [Peter Piwowarski][]
- *Julia* by [Kenta Sato][]
- *Golo* by [Philippe Charrière][]

New Styles:

Expand All @@ -12,6 +13,7 @@ New Styles:
[Jet Brains]: https://www.jetbrains.com/
[Peter Piwowarski]: https://github.com/oldlaptop
[Kenta Sato]: https://github.com/bicycle1885
[Philippe Charrière]: https://github.com/k33g


## Version 8.4
Expand Down
8 changes: 8 additions & 0 deletions docs/css-classes-reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ Go ("go", "golang")
* ``typename``: built-in plain types (int, string etc.)
* ``built_in``: built-in functions

Golo ("golo", "gololang")
-------------------

* ``keyword``: language keywords
* ``literal``: true false null
* ``typename``: Golo type objects (DynamicObject, struct, ...)
* ``annotation``: decorator

Gradle ("gradle")
-----------------

Expand Down
30 changes: 30 additions & 0 deletions src/languages/golo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
Language: Golo
Author: Philippe Charriere <[email protected]>
Description: a lightweight dynamic language for the JVM, see http://golo-lang.org/
Category: dynamic language for Java
*/

function(hljs) {
return {
keywords: {
literal : 'true false null',
keyword: 'println readln print import module function local return let var ' +
'while for foreach times in case when match with break continue ' +
'augment augmentation each find filter reduce' +
'if then else otherwise try catch finally raise throw orIfNull ',
typename:
'DynamicObject|10 DynamicVariable struct Observable map set vector list array'
},
contains: [
hljs.HASH_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE,
{
className: 'annotation', begin: '@[A-Za-z]+'
}
]
}
}


14 changes: 14 additions & 0 deletions test/detect/golo/default.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module hello

function dyno = -> DynamicObject()

struct human = { name }

function main = |args| {
let a = 1
var b = 2

println("hello")

let john = human("John Doe")
}

0 comments on commit 9b1a9ea

Please sign in to comment.