-
Notifications
You must be signed in to change notification settings - Fork 177
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 Grain language support #712
Conversation
from "uint8" include Uint8 | ||
use Uint8.{ (+), (-), (&), (>), (==) } | ||
|
||
let smiley = b"\xc3\x81\x24\x24\x00\x24\x99\xc3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested a variation of this example using png2src output instead of the manual things here, and it worked for me.
The original example here also worked for me. I used a manually built Grain 0.6.3.
@@ -29,6 +29,8 @@ function requireLang (opts) { | |||
return "d"; | |||
} else if (opts.go) { | |||
return "go"; | |||
} else if (opts.grain) { | |||
return "grain"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I testing making a new project as well as png2src.
@@ -77,7 +77,7 @@ function start (opts) { | |||
return skip | |||
} else { | |||
// Only trigger on source file changes | |||
return /\.(c|cpp|d|go|h|nelua|nim|odin|pn|porth|rol|rs|ts|wat|zig)$/.test(file); | |||
return /\.(c|cpp|d|go|gr|h|nelua|nim|odin|pn|porth|rol|rs|ts|wat|zig)$/.test(file); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had trouble getting watch working in general, but this is the right suffix for grain.
@@ -27,6 +27,8 @@ | |||
"gamedev", | |||
"go", | |||
"golang", | |||
"grain", | |||
"grainlang", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some other languages are missing from this tag list, but I didn't add others in this PR.
@@ -8,6 +8,7 @@ const classNameToLanguage = { | |||
"language-c3": "c3", | |||
"language-cpp": "c", | |||
"language-d": "d", | |||
"language-grain": "grain", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't even know what this file is, but I added grain alongside the other languages.
Thanks Tom! I haven't tried out the latest version of Grain yet, but this looks really useful. |
\x
byte string format for png2src