Fixing up the REPL a skitchbit.
This commit is contained in:
parent
ff37c47c43
commit
4172ca2db7
10
bin/hy
10
bin/hy
@ -4,6 +4,8 @@ import sys
|
||||
import ast
|
||||
import code
|
||||
import readline
|
||||
|
||||
import hy
|
||||
from hy.lex.states import Idle, LexException
|
||||
from hy.lex.machine import Machine
|
||||
from hy.compiler import hy_compile
|
||||
@ -40,7 +42,7 @@ sys.ps1 = "=> "
|
||||
sys.ps2 = "... "
|
||||
|
||||
hr = HyREPL()
|
||||
hr.interact("""
|
||||
Hi! Welcome to Hy!
|
||||
|
||||
""")
|
||||
hr.interact("{appname} {version}".format(
|
||||
appname=hy.__appname__,
|
||||
version=hy.__version__
|
||||
))
|
||||
|
@ -262,6 +262,9 @@ class Idle(State):
|
||||
if char == "(":
|
||||
return Expression
|
||||
|
||||
if char == "[":
|
||||
return List
|
||||
|
||||
if char == "{":
|
||||
return Dict
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user