Adds support for SETUP_ANNOTATION op and variable annotations

Tests have also been added.

Fixes #169
This commit is contained in:
John Richards
2020-10-21 21:42:13 -04:00
parent d3a46f711f
commit 345035b544
5 changed files with 74 additions and 3 deletions

Binary file not shown.

View File

@@ -0,0 +1,8 @@
a: int
b
c = 'no annotation'
x: int = 10
y: str = 'annotation'
z: tuple = (1, 2, 3)
confirm_subscr = {}
confirm_subscr['test'] = 'works'

View File

@@ -0,0 +1,8 @@
a : int <EOL>
b <EOL>
c = 'no annotation' <EOL>
x : int = 10 <EOL>
y : str = 'annotation' <EOL>
z : tuple = ( 1 , 2 , 3 ) <EOL>
confirm_subscr = { } <EOL>
confirm_subscr [ 'test' ] = 'works' <EOL>