Whiley
A TextMate plugin for Whiley
Details
Installs
- Total 20
- Win 11
- Mac 6
- Linux 3
Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
WhileySyntaxBundle
This provides TextMate and Sublime bundles to enable syntax highlighting for programs written in the Whiley. This also serves as the grammar for github/linguist (which enables syntax highlighting on Github).
An example Whiley program is the following:
type nat is (int x) where x >= 0
function indexOf(int[] items, int item) -> (int r)
// If valid index returned, element matches item
ensures r >= 0 ==> items[r] == item
// If invalid index return, no element matches item
ensures r < 0 ==> all { i in 0..|items| | items[i] != item }
// Return value is between -1 and size of items
ensures r >= -1 && r < |items|:
//
nat i = 0
while i < |items|
where all { k in 0 .. i | items[k] != item }:
//
if items[i] == item:
return i
i = i + 1
//
return -1
Install (Sublime)
Eventually you will be able to install via
PackageControl. For now, you can copy
the whiley.submlime-text
file into
.config/sublime-tests/Packages/User
.
Install (TextMate)
mkdir -p ~/Library/Application\ Support/TextMate/Bundles
cd ~/Library/Application\ Support/TextMate/Bundles
git clone git://github.com/Whiley/WhileySyntaxBundle Whiley.tmbundle
Developers
The single source of truth is the file
Syntaxes/whiley.YAML-tmLanguage
. This is used to generate the
remaining files:
whiley.tmLanguage
. This is generated by installing PackageDev and then runningTools > Build
onwhiley.YAML-tmLanguage
and choosingConvert to: Property List
.whiley.sublime-text
. This is generated by selecting the filewhiley.tmLanguage
and runningTools > Developer > New Syntax from whiley.tmLanguage ...
.