Some integration with Type Checking.

Now the UI highlights commands and numbers as you move the mouse, numbers
are blue, commands that type-check are green, commands that fail to
type-check are orange and will not be interpreted, and if there is no
stack effect information available for a command it is grey but you can
still attempt to execute it.

You can still evaluate whole expressions by selceting them and
right-inter-clicking before you release the left button, or by putting
the cursor on a line and typing ctrl-enter, which will run the whole
line.  These expressions are NOT (yet) type-checked.
This commit is contained in:
Simon Forman
2018-07-15 11:48:08 -07:00
parent 0292e8a297
commit e169c6aae2
5 changed files with 76 additions and 15 deletions
+4
View File
@@ -65,6 +65,7 @@ class MouseBindingsMixin:
self.bind("<ButtonRelease-3>", self.B3r)
self.bind("<Any-Leave>", self.leave)
self.bind("<Motion>", self.scan_command)
def B1d(self, event):
'''button one pressed'''
@@ -167,6 +168,9 @@ class MouseBindingsMixin:
return "break"
def scan_command(self, event):
self.update_command_word(event)
def B1r(self, event):
'''button one released'''
self.B1_DOWN = False