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 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__
|
||||||
""")
|
))
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user