Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Imba programming language #3869

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -883,3 +883,6 @@
[submodule "vendor/grammars/wdl-sublime-syntax-highlighter"]
path = vendor/grammars/wdl-sublime-syntax-highlighter
url = https://github.com/broadinstitute/wdl-sublime-syntax-highlighter
[submodule "vendor/grammars/language-imba"]
path = vendor/grammars/language-imba
url = https://github.com/somebee/language-imba
2 changes: 2 additions & 0 deletions grammars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ vendor/grammars/language-haskell:
- source.hsc2hs
- source.hsig
- text.tex.latex.haskell
vendor/grammars/language-imba:
- source.imba
vendor/grammars/language-inform7:
- source.inform7
vendor/grammars/language-javascript:
Expand Down
11 changes: 11 additions & 0 deletions lib/linguist/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1889,6 +1889,17 @@ IGOR Pro:
tm_scope: none
ace_mode: text
language_id: 162
Imba:
type: programming
tm_scope: source.imba
color: "#71A4F6"
aliases:
- imba
extensions:
- ".imba"
interpreters:
- imba
language_id: 1057618448
INI:
type: data
extensions:
Expand Down
23 changes: 23 additions & 0 deletions samples/Imba/classes.imba
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
class Animal

def initialize name
@name = name

def move meters
console.log "{@name} moved {meters}m."

class Snake < Animal
def move
console.log "Slithering..."
super 5

class Horse < Animal
def move
console.log "Galloping..."
super 45

var sam = Snake.new "Sammy the Python"
var tom = Horse.new "Tommy the Palomino"

sam.move
tom.move
1 change: 1 addition & 0 deletions samples/Imba/hello.imba
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log "Hello, World!"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this sample. We require only real-world usage samples and "hello world" is never real-world usage 😉

5 changes: 5 additions & 0 deletions vendor/licenses/grammar/language-imba.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
type: grammar
name: language-imba
license: mit
---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks to have been manually added rather than pulled in from the grammar repo itself.

The grammar repo needs to explicitly include a license file which script/add-grammar will automatically pull in and assess.