Skip to content
This repository has been archived by the owner on Jan 26, 2020. It is now read-only.

Commit

Permalink
🎨 added syntax coloring for Vyper specific types
Browse files Browse the repository at this point in the history
  • Loading branch information
p- committed Mar 12, 2018
1 parent bf594f1 commit 63bcc1b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
# Change Log
All notable changes to the "vscode-vyper" extension will be documented in this file.

## 0.0.3
- Added 'Build on Save'
- Syntax coloring for Vyper specific types

## 0.0.2
- The virtual env path can now be changed
- The Vyper contract can now be in a subdirectory

## 0.0.1
- Initial release
- Vyper: Build Contract command that build a give contract and displays syntax errors
- Vyper: 'Build Contract' command that builds a given contract and displays its errors
- Syntax Higlighting for Vyper (*.vy, *.v.py) files
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
{
"language": "vyper",
"scopeName": "source.vyper",
"path": "./syntax/MagicPython.tmLanguage.json"
"path": "./syntax/MagicVyper.tmLanguage.json"
}
],
"configuration": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"information_for_contributors": [
"This file has been converted from https://github.com/MagicStack/MagicPython/blob/master/grammars/MagicPython.tmLanguage"
"This file has been converted from https://github.com/MagicStack/MagicPython/blob/master/grammars/MagicPython.tmLanguage",
"Extended with types for Vyper"
],
"version": "https://github.com/MagicStack/MagicPython/commit/b453f26ed856c9b16a053517c41207e3a72cc7d5",
"name": "MagicVyper",
Expand Down Expand Up @@ -1617,7 +1618,7 @@
},
"builtin-types": {
"name": "support.type.python",
"match": "(?x)\n (?<!\\.) \\b(\n bool | bytearray | bytes | classmethod | complex | dict\n | float | frozenset | int | list | object | property\n | set | slice | staticmethod | str | tuple | type\n\n (?# Although 'super' is not a type, it's related to types,\n and is special enough to be highlighted differently from\n other built-ins)\n | super\n )\\b\n"
"match": "(?x)\n (?<!\\.) \\b(\n int128 | uint256 | decimal | bytes32 | address | timestamp | timedelta | wei_value | bool | bytearray | bytes | classmethod | complex | dict\n | float | frozenset | int | list | object | property\n | set | slice | staticmethod | str | tuple | type\n\n (?# Although 'super' is not a type, it's related to types,\n and is special enough to be highlighted differently from\n other built-ins)\n | super\n )\\b\n"
},
"magic-function-names": {
"comment": "these methods have magic interpretation by python and are generally called\nindirectly through syntactic constructs\n",
Expand Down
10 changes: 10 additions & 0 deletions testdata/types.vy
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
int128Type: int128
uint256Type: uint256
decimalType: decimal
bytes32Type: bytes32
addressType: address

# Unit types
timestampType: timestamp
timeDeltaType: timedelta
weiValueType: wei_value

0 comments on commit 63bcc1b

Please sign in to comment.