Skip to content

Commit

Permalink
✨ 1.1.4 Update: Emmet-like WAT completions
Browse files Browse the repository at this point in the history
  • Loading branch information
NateLevin1 committed Mar 10, 2023
1 parent 7e87a29 commit 204b888
Show file tree
Hide file tree
Showing 9 changed files with 250 additions and 70 deletions.
37 changes: 23 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,30 @@

WATI is an improved syntax for hand writing WebAssembly text format.

The transpiler is **deprecated**, and stored under the `wati2wat` directory.
Instead, use the VS Code extension, which has Emmet-like text completions for some of the features below.

## Supported Features

### Instructions
- Inline function arguments: `call $fn(1i32, 2i32)`
- Get variables without `.get`: `$a`
- Set variables without `.set`: `$a = $b`
- Make constants without `.const`: `10i32`, `1.5f32`
- Make parameters without `(param`: `($a i32)`
- Make locals without `(local`: `(l$a i32)`

- Inline function arguments: `call $fn(1i32, 2i32)`
- Get variables without `.get`: `$a`
- Set variables without `.set`: `$a = $b`
- Make constants without `.const`: `10i32`, `1.5f32`
- Make parameters without `(param`: `($a i32)`
- Make locals without `(local`: `(l$a i32)`

### Quality of Life
- Auto completion and type information for variables and functions
- Auto completion for most instructions
- Docs and type information on hover
- See type information on a function when calling it

- Auto completion and type information for variables and functions
- Auto completion for most instructions
- Docs and type information on hover
- See type information on a function when calling it

### Documentation
- JSDoc Tags
- Rich color for @param tags
- Rich color for function-related tags (e.g. @function)
- Highlighting of @todo

- JSDoc Tags
- Rich color for @param tags
- Rich color for function-related tags (e.g. @function)
- Highlighting of @todo
6 changes: 6 additions & 0 deletions extensions/vscode/wati/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to the "wati" extension will be documented in this file.

## 1.1.4

### Changes

- New emmet-like WAT completions are now available. These new completions allow you to quickly write WAT code with fewer keystrokes!

## 1.0.3

### Changes
Expand Down
15 changes: 11 additions & 4 deletions extensions/vscode/wati/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# WATI: WebAssembly Text Format Improved!

[![Version](https://vsmarketplacebadge.apphb.com/version/natelevin.wati.svg)](https://marketplace.visualstudio.com/items?itemName=Vallentin.vscode-bnf)
[![Installs](https://vsmarketplacebadge.apphb.com/installs/natelevin.wati.svg)](https://marketplace.visualstudio.com/items?itemName=Vallentin.vscode-bnf)
[![Version](https://img.shields.io/visual-studio-marketplace/v/natelevin.wati?label=Version%3A)](https://marketplace.visualstudio.com/items?itemName=natelevin.wati)
[![Installs](https://img.shields.io/visual-studio-marketplace/i/natelevin.wati?label=Installs%3A)](https://marketplace.visualstudio.com/items?itemName=natelevin.wati)

WATI provides code completion, intellisense, and hover information for the WebAssembly Text Format (`.wat` files).

Expand All @@ -15,6 +15,10 @@ WATI provides code completion, intellisense, and hover information for the WebAs
- Auto completion for most instructions
- Docs and type information on hover
- See type information on a function when calling it (signatures)
- Magical emmet-like completions:
- Easily create constants: `5i32` -> `(i32.const 5)`, `30.12f64` -> `(f64.const 30.12)`, `100_000i64` -> `(i64.const 100000)`
- Access local and global variables easily, with autocompletion: `l$someLocal` -> `(local.get $someLocal)`, `g$someGlobal` -> `(global.get $someGlobal)`
- Set local and global variables with autocompletion: `l=$someLocal` -> `(local.set $someLocal |)`, `g=$someGlobal` -> `(global.set $someGlobal |)`

### Documentation

Expand All @@ -34,6 +38,10 @@ WATI provides code completion, intellisense, and hover information for the WebAs
## Release Notes

### 1.1.4

New emmet-like WAT completions are now available. These new completions allow you to quickly write WAT code with fewer keystrokes!

### 1.0.3

**Greatly improved code comprehension**: Much more accurate variable recognition, display global initial values, completion and hover information for block labels.
Expand All @@ -54,6 +62,5 @@ Initial release.

## Requirements

No other extensions are required, though for
the WAT intellisense you will need to have the
No other extensions are required, though for the WAT intellisense you will need to have the
[WebAssembly extension](https://marketplace.visualstudio.com/items?itemName=dtsvet.vscode-wasm).
112 changes: 92 additions & 20 deletions extensions/vscode/wati/out/extension.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion extensions/vscode/wati/out/extension.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion extensions/vscode/wati/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "wati",
"displayName": "WATI",
"description": "Intellisense and hover information for the WebAssembly Text Format (.wat)",
"version": "1.0.3",
"version": "1.1.4",
"license": "MIT",
"icon": "images/icon.png",
"publisher": "NateLevin",
Expand Down
Loading

0 comments on commit 204b888

Please sign in to comment.