Skip to content

Commit

Permalink
docs: readme: typos
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Oct 19, 2023
1 parent a7db6b5 commit 070d081
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ parse(`
You can make any modifications to **Goldstein AST** and then `print` back to **Goldstein**:

```js
import {parse, print} from 'goldstein';
import {
parse,
print,
} from 'goldstein';

const ast = parse(`const t = try f('hello')`);
const source = print(ast);
Expand All @@ -198,10 +201,10 @@ You can even convert **JavaScript** to **Goldstein** with:
```js
import {convert} from 'goldstein';

const ast = convert(`const t = tryCatch(f, 'hello');`;
const ast = convert(`const t = tryCatch(f, 'hello')`);

// returns
`const t = try f('hello')`)
`const t = try f('hello')`;
```

## Keywords
Expand All @@ -227,13 +230,12 @@ function hello() {
}
```


### `append array`

Append new elements to an array just like in Swift:

```js
const a = [1];
let a = [1];

a += [2, 3];
```
Expand Down

0 comments on commit 070d081

Please sign in to comment.