From 4172ca2db7596470e841cab8edf8ee953298a8fa Mon Sep 17 00:00:00 2001 From: "Paul R. Tagliamonte" Date: Thu, 14 Mar 2013 19:44:33 -0400 Subject: [PATCH] Fixing up the REPL a skitchbit. --- bin/hy | 10 ++++++---- hy/lex/states.py | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/bin/hy b/bin/hy index 24496c3..08edab5 100755 --- a/bin/hy +++ b/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__ +)) diff --git a/hy/lex/states.py b/hy/lex/states.py index 170bb05..190deaa 100644 --- a/hy/lex/states.py +++ b/hy/lex/states.py @@ -262,6 +262,9 @@ class Idle(State): if char == "(": return Expression + if char == "[": + return List + if char == "{": return Dict