commit
1962826c1c
2
NEWS
2
NEWS
@ -280,7 +280,7 @@ Changes from Hy 0.9.10
|
|||||||
* Clarified rest / cdr, cleaned up require
|
* Clarified rest / cdr, cleaned up require
|
||||||
* Make with return the last expression from its branch
|
* Make with return the last expression from its branch
|
||||||
* Fix yielding to not suck (#151)
|
* Fix yielding to not suck (#151)
|
||||||
* Make assoc accept multiple values, also added a even/odd check for
|
* Make assoc accept multiple values, also added an even/odd check for
|
||||||
checkargs
|
checkargs
|
||||||
* Added ability to parse doc strings set in defclass declarations,
|
* Added ability to parse doc strings set in defclass declarations,
|
||||||
* Provide bin scripts for both Windows and *nix
|
* Provide bin scripts for both Windows and *nix
|
||||||
|
@ -45,12 +45,12 @@ def ast_compile(ast, filename, mode):
|
|||||||
|
|
||||||
|
|
||||||
def import_buffer_to_hst(buf):
|
def import_buffer_to_hst(buf):
|
||||||
"""Import content from buf and return an Hy AST."""
|
"""Import content from buf and return a Hy AST."""
|
||||||
return tokenize(buf + "\n")
|
return tokenize(buf + "\n")
|
||||||
|
|
||||||
|
|
||||||
def import_file_to_hst(fpath):
|
def import_file_to_hst(fpath):
|
||||||
"""Import content from fpath and return an Hy AST."""
|
"""Import content from fpath and return a Hy AST."""
|
||||||
try:
|
try:
|
||||||
with open(fpath, 'r', encoding='utf-8') as f:
|
with open(fpath, 'r', encoding='utf-8') as f:
|
||||||
return import_buffer_to_hst(f.read())
|
return import_buffer_to_hst(f.read())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user