Wren Support
See original GitHub issueWren Language
Wren is a small, fast, class-based concurrent scripting language
Think Smalltalk in a Lua-sized package with a dash of Erlang and wrapped up in a familiar, modern syntax.
System.print("Hello, world!")
class Wren {
flyTo(city) {
System.print("Flying to %(city)")
}
}
var adjectives = Fiber.new {
["small", "clean", "fast"].each {|word| Fiber.yield(word) }
}
while (!adjectives.isDone) System.print(adjectives.call())
Additional resources
Possible Implementation
Butchered some available languages and came with something. But stills needs some testing 👍
// Prism.languages.wren
export default (function (Prism) {
var multilineComment = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source;
for (var i = 0; i < 2; i++) {
// support 4 levels of nested comments
multilineComment = multilineComment.replace(/<self>/g, function () { return multilineComment; });
}
multilineComment = multilineComment.replace(/<self>/g, function () { return /[^\s\S]/.source; });
Prism.languages.wren = {
'hashbang': {
pattern: /^#!.*/,
greedy: true,
alias: 'comment'
},
'comment': [
{
pattern: RegExp(/(^|[^\\])/.source + multilineComment),
lookbehind: true,
greedy: true
},
{
pattern: /(^|[^\\:])\/\/.*/,
lookbehind: true,
greedy: true
}
],
'triple-quoted-string': {
pattern: /(?:[])?(""")[\s\S]*?\1/i,
greedy: true,
alias: 'string'
},
'string': {
pattern: /(?:[])?(")[\s\S]*?\1/i,
greedy: true
},
'class-name': {
pattern: /(\b(?:class|is|Num|System|Object|Sequence|List|Map|Bool|String|Range|Fn|Fiber)\s+|\bcatch\s+\()[\w.\\]+/i,
lookbehind: true,
inside: {
'punctuation': /[.\\]/
}
},
'keyword': /\b(?:if|else|while|for|return|in|is|as|null|break|continue|foreign|construct|static|var|class|this|super|#!|#)\b/,
'boolean': /\b(?:true|false)\b/,
'number': /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
'null': {
pattern: /\bnull\b/,
alias: 'keyword'
},
'function': /(?!\d)\w+(?=\s*(?:[({]))/,
'operator': [
/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,
{
// Match ".." but don't break "..."
pattern: /(^|[^.])\.\.(?!\.)/,
lookbehind: true
}
],
'punctuation': /[\[\](){},;]|\.+|:+/
};
});
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Contact Us - Wren Kitchens
Need assistance with your Wren kitchen? Contact us today by e-mail or phone. We're here to help. ... Customer Support Contact Details ...
Read more >Contact Us - Wren Solutions
Contact Us. 124 Wren Parkway Jefferson City, Missouri 65109. (800) 881-2249. info@wrensolutions.com. How Can We Help? First name*. Last name*. Company name*.
Read more >Wren | Systemic change starts with you
Wren helps you calculate and offset your personal carbon emissions through a monthly subscription. ... Our projects wouldn't happen without your support.
Read more >Technical Support – WrenSports
Installation, Service, and Owner's Manuals. Manuals and Guides. Wren Suspension Fork Manual · Revised Wren TwinAir System Setup Instructions.
Read more >Women's Rights and Empowerment Network: Home
"I support WREN because I always wanted it to exist for me, for my daughter, for all women, girls and their families in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@clsource Would you like to do a PR?
@joshgoebel I think it’s ok. It’s a little off-topic but you also contribute by responding to comments and sharing your experience, so I don’t mind.
Ok implemented your suggestions and added hashbangs 👍