Fixing up the REPL a skitchbit.

This commit is contained in:
Paul R. Tagliamonte 2013-03-14 19:44:33 -04:00
parent ff37c47c43
commit 4172ca2db7
2 changed files with 9 additions and 4 deletions

10
bin/hy
View File

@ -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__
))

View File

@ -262,6 +262,9 @@ class Idle(State):
if char == "(":
return Expression
if char == "[":
return List
if char == "{":
return Dict