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 ast
import code import code
import readline import readline
import hy
from hy.lex.states import Idle, LexException from hy.lex.states import Idle, LexException
from hy.lex.machine import Machine from hy.lex.machine import Machine
from hy.compiler import hy_compile from hy.compiler import hy_compile
@ -40,7 +42,7 @@ sys.ps1 = "=> "
sys.ps2 = "... " sys.ps2 = "... "
hr = HyREPL() hr = HyREPL()
hr.interact(""" hr.interact("{appname} {version}".format(
Hi! Welcome to Hy! appname=hy.__appname__,
version=hy.__version__
""") ))

View File

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