Re: WAST support on GitHub

Ah, perfect! That's exactly the sort of feedback I was hoping for, thank
you!

*block comments can nest, but I suspect the highlighting mechanism won't be
> able to handle that?*


No, don't worry. It can, and already is. =) In the readme file for the
grammar repository, there's a preview image
<https://raw.githubusercontent.com/Alhadis/language-webassembly/master/preview.png>
where
you can see a nesting block comment on the left.

*most module-level keywords seem to be missing, e.g., `global`, `memory`,
> `table`, `import`, `export` and more*


Should these keywords only be highlighted as such when they're matched at
the start of an S-expression?

Forgive me, I'm still new to this language...

On 22 June 2017 at 17:38, Andreas Rossberg <rossberg@google.com> wrote:

> Nice! Some observations:
>
> - most module-level keywords seem to be missing, e.g., `global`, `memory`,
> `table`, `import`, `export` and more
> - `clz`, `ctz`, `popcnt` are int-only
> - `lt` is float-only
> - block comments can nest, but I suspect the highlighting mechanism won't
> be able to handle that?
>
> You can peek at the definition of the lexical grammar in the reference
> interpreter for regexps and a complete list of tokens:
>
> https://github.com/WebAssembly/spec/blob/master/
> interpreter/text/lexer.mll#L91
>
> /Andreas
>
>
>
> On 22 June 2017 at 07:03, John Gardner <gardnerjohng@gmail.com> wrote:
>
>> GitHub limits filetype recognition to text-based formats only, meaning
>> binary files are skipped when calculating a repository's usage statistics.
>> So it would've been pointless to include .wasm as a recognised extension.
>>
>>
>> On 22 June 2017 at 14:44, Wink Saville <wink@saville.com> wrote:
>>
>>> Did you consider tracking .wasm files, the binary format for .wast? It
>>> should be fairly easy to incorporate wasm2wast to convert .wasm -> .wast on
>>> the fly?
>>>
>>> On Wed, Jun 21, 2017 at 7:14 PM John Gardner <gardnerjohng@gmail.com>
>>> wrote:
>>>
>>>> Hello!
>>>>
>>>> I meant to give a heads up nearly a month ago, but better late than
>>>> never... Just to inform you all that WebAssembly will soon be formally
>>>> classified on GitHub <https://github.com/github/linguist/pull/3650>.
>>>>
>>>> This has two (admittedly superficial) benefits:
>>>>
>>>>    1. It will now be possible to search for "WebAssembly" repos on
>>>>    GitHub, which should also facilitate gauging the language's in-the-wild use
>>>>    (at least as far as .wast and .wat files are concerned).
>>>>    2. .wast and .wat files will now receive syntax highlighting using
>>>>    a language-grammar hand-written
>>>>    <https://github.com/Alhadis/language-webassembly> by yours truly.
>>>>
>>>> If there are any corrections or updates that should be made to the
>>>> grammar's highlighting, please file an issue and I'll fix it as soon as
>>>> possible. =)
>>>>
>>>> (The changes will be live on GitHub with the next release of Linguist
>>>> <https://github.com/github/linguist>. We don't have a concrete release
>>>> schedule, but it generally happens every few weeks or so...)
>>>>
>>>> Regards,
>>>> - John / @Alhadis <http://github.com/Alhadis>
>>>>
>>>
>>
>

Received on Thursday, 22 June 2017 10:27:05 UTC