diff --git a/README.md b/README.md index 391bd09..f0cea17 100644 --- a/README.md +++ b/README.md @@ -143,7 +143,7 @@ npx tape ./tests/helpers.js | npx tap-spec Piping to `tap-spec` is optional, but it makes the output easier to read. - # 🚀 Quick start @@ -203,7 +205,7 @@ const ast = S.parse(`( 1 "a \\"b\\" c" true null d (e f ()) )`) if (S.isExpression(ast)) { console.log(`ast is an expression: ${JSON.stringify(ast)}`) -} else { +} else { throw Error(`ast is not a valid expression`) } @@ -229,11 +231,11 @@ for (let e of ast) { Output: ```clj -ast is an expression: [1,"\"a \"b\" c\"","true","null","d",["e","f",[]]] +ast is an expression: [1,"\"a \\\"b\\\" c\"","true","null","d",["e","f",[]]] ast[0] is a number with value: 1 -ast[1] is a string with value: "a \"b\" c" +ast[1] is a string with value: "a \\\"b\\\" c" ast[2] is a boolean with value: true -ast[3] is a null with value: null +ast[3] is null: null ast[4] is an atom with id: d ast[5] is an expression: ["e","f",[]] ``` @@ -305,16 +307,16 @@ The project is [MIT License](https://github.com/NLKNguyen/code-formation/blob/ma It is a simple permissive license with conditions only requiring the preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code. -