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 Wren language #4088

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -895,6 +895,9 @@
[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/wren-sublime"]
path = vendor/grammars/wren-sublime
url = https://github.com/munificent/wren-sublime
[submodule "vendor/grammars/xc.tmbundle"]
path = vendor/grammars/xc.tmbundle
url = https://github.com/graymalkin/xc.tmbundle
Expand Down
2 changes: 2 additions & 0 deletions grammars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,8 @@ vendor/grammars/vue-syntax-highlight:
- text.html.vue
vendor/grammars/wdl-sublime-syntax-highlighter:
- source.wdl
vendor/grammars/wren-sublime:
- source.wren
vendor/grammars/xc.tmbundle:
- source.xc
vendor/grammars/xml.tmbundle:
Expand Down
8 changes: 8 additions & 0 deletions lib/linguist/languages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5325,6 +5325,14 @@ wisp:
- ".wisp"
tm_scope: source.clojure
language_id: 420
Wren:
type: programming
color: "#3399CC"
extensions:
- ".wren"
ace_mode: text
tm_scope: source.wren
language_id: 432
xBase:
type: programming
color: "#403a40"
Expand Down
15 changes: 15 additions & 0 deletions samples/Wren/ex.wren
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
System.print("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.

Linguist needs real-world usage examples to properly train the classifier. "Hello world" code is never real-world usage code. Please replace this with an example of a file from a real project and provide a reference to it and it's license in a comment in the PR.

Choose a reason for hiding this comment

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

class Wren {
flyTo(city) {
System.print("Flying to %(city)")
}
}

// I am a comment

var adjectives = Fiber.new {
["small", "clean", "fast"].each {|word| Fiber.yield(word) }
}

while (!adjectives.isDone) System.print(adjectives.call())
1 change: 1 addition & 0 deletions vendor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ This is a list of grammars that Linguist selects to provide syntax highlighting
- **WebIDL:** [andik/IDL-Syntax](https://github.com/andik/IDL-Syntax)
- **wisp:** [atom/language-clojure](https://github.com/atom/language-clojure)
- **World of Warcraft Addon Data:** [nebularg/language-toc-wow](https://github.com/nebularg/language-toc-wow)
- **Wren:** [munificent/wren-sublime](https://github.com/munificent/wren-sublime)
- **X10:** [x10-lang/x10-highlighting](https://github.com/x10-lang/x10-highlighting)
- **xBase:** [hernad/atom-language-harbour](https://github.com/hernad/atom-language-harbour)
- **XC:** [graymalkin/xc.tmbundle](https://github.com/graymalkin/xc.tmbundle)
Expand Down
1 change: 1 addition & 0 deletions vendor/grammars/wren-sublime
Submodule wren-sublime added at 94cc34
28 changes: 28 additions & 0 deletions vendor/licenses/grammar/wren-sublime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
type: grammar
name: wren-sublime
license: other
---
Copy link
Member

Choose a reason for hiding this comment

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

Can you please update your fork with the latest master, and try replacing the grammar with itself using:

script/add-grammar --replace wren-sublime https://github.com/munificent/wren-sublime

This should hopefully use the new Licensed code to correctly and automatically detect the license.

The Wren Sublime Package uses the MIT License:

Copyright (c) 2013-2016 Robert Nystrom

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software. (As clarification, there is no
requirement that the copyright notice and permission be included in binary
distributions of the Software.)

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.