Re: WAST support on GitHub

Yikes, there certainly were a few keywords missing.

I've amended the grammar
<https://github.com/Alhadis/language-webassembly/commit/15fdf2c4cb022732a25f8397150d8fc36ddaef53>
with the recommended revisions. =) I'll wait a day or so before cutting
another release, in case anybody else spots something that should be
updated/fixed.

Thank you again for the feedback!

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

> On 22 June 2017 at 12:26, John Gardner <gardnerjohng@gmail.com> wrote:
>
>> Should these keywords only be highlighted as such when they're matched at
>> the start of an S-expression?
>>
>
> Their keyword status does not dependent on context, so I would highlight
> them anywhere.
>
> You might also be interested in the draft specification of the lexical
> syntax, which gives a few more details:
>
>   https://webassembly.github.io/spec/text/lexical.html
>
> And actually, I just see that the definition of `keyword` there is bogus
> as written. :)
>
>
> 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 Friday, 23 June 2017 12:18:10 UTC