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.
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.
| } else if (opts.go) { | ||
| return "go"; | ||
| } else if (opts.grain) { | ||
| return "grain"; |
There was a problem hiding this comment.
I testing making a new project as well as png2src.
| } 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.
I had trouble getting watch working in general, but this is the right suffix for grain.
| "go", | ||
| "golang", | ||
| "grain", | ||
| "grainlang", |
There was a problem hiding this comment.
Some other languages are missing from this tag list, but I didn't add others in this PR.
| "language-c3": "c3", | ||
| "language-cpp": "c", | ||
| "language-d": "d", | ||
| "language-grain": "grain", |
There was a problem hiding this comment.
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. |
\xbyte string format for png2src