From b32dde3c917ac595a21fa17649d84ad005a0eab5 Mon Sep 17 00:00:00 2001 From: Nicolas Cannasse Date: Fri, 10 Apr 2020 10:09:34 +0200 Subject: [PATCH] 2.4.0 --- README.md | 16 ++++++++++++++-- haxelib.json | 4 ++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8663a181..b8518172 100644 --- a/README.md +++ b/README.md @@ -68,24 +68,36 @@ You can use `parser.allowMetadata` to parse metadata before expressions on in an You can use `new hscript.Macro(pos).convert(ast)` to convert an hscript AST to a Haxe macros one. +You can use `hscript.Checker` in order to type check and even get completion, using `haxe -xml` output for type information. + Limitations ----------- Compared to Haxe, limitations are : -- no type declarations (classes, enums, typedefs) : only expressions - `switch` construct is supported but not pattern matching (no variable capture, we use strict equality to compare `case` values and `switch` value) - only one variable declaration is allowed in `var` - the parser supports optional types for `var` and `function` if `allowTypes` is set, but the interpreter ignores them - you can enable per-expression position tracking by compiling with `-D hscriptPos` +- you can parse some type declarations (import, class, typedef, etc.) with parseModule Install ------- In order to install Haxe Script, use `haxelib install hscript` and compile your program with `-lib hscript`. -There are only three files in hscript : +These are the main required files in hscript : - `hscript.Expr` : contains enums declarations - `hscript.Parser` : a small parser that turns a string into an expression structure (AST) - `hscript.Interp` : a small interpreter that execute the AST and returns the latest evaluated value + +Some other optional files : + + - `hscript.Async` : converts Expr into asynchronous version + - `hscript.Bytes` : Expr serializer/unserializer + - `hscript.Checker` : type checking and completion for hscript Expr + - `hscript.Macro` : convert Haxe macro into hscript Expr + - `hscript.Printer` : convert hscript Expr to String + - `hscript.Tools` : utility functions (map/iter) + \ No newline at end of file diff --git a/haxelib.json b/haxelib.json index 1a58de20..38198f3e 100644 --- a/haxelib.json +++ b/haxelib.json @@ -3,7 +3,7 @@ "url": "https://github.com/HaxeFoundation/hscript", "license": "MIT", "description": "Haxe Script is a scripting engine for a subset of the Haxe language", - "version": "2.3.0", - "releasenote": "", + "version": "2.4.0", + "releasenote": "Haxe 4.0 final + type checking/completion (hscript.Checker)", "contributors": ["ncannasse"] } \ No newline at end of file