Skip to content

Commit

Permalink
Update export paths
Browse files Browse the repository at this point in the history
  • Loading branch information
disnet committed Jun 30, 2019
1 parent 3195abc commit 6c65312
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ An `Outcome` represents a `Success` or a `Failure` (for those coming from a func
A `ParseResult` is an object of shape `{ value, ctx }` that holds the resulting value along with the new `Context`.

```js
import { Outcome } from 'parser-lang/outcome';
import { Outcome } from 'parser-lang';

let p = new Parser(ctx => {
return Outcome.of({
Expand Down Expand Up @@ -566,7 +566,7 @@ Return the original outcome after applying `f` to the value for its effects.
### Context

```js
import Context from 'parser-lang/context`;
import { Context } from 'parser-lang`;
```
The **context** protocol defines a standard way for mutable iterable objects to be used in an "immutable" way by allowing consumers to make clones before performing mutations.
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ sequence(char('a'), char('b'))
One downside of defining parser combinators using JavaScript functions and methods is that it can become difficult to read as the parsers grow in complexity. The way ParserLang approaches handling this problem is by allowing you to define your parsers using a declarative language in template literals:

```js
import lang from 'parser-lang/lang';
import { lang } from 'parser-lang';

let { a } = lang`
a = 'a';
Expand Down
3 changes: 3 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
export { default } from './src/parser';
export * from './src/parser';
export { default as Context } from './src/context';
export { default as lang } from './src/lang';
export * from './src/outcome';
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "parser-combinators",
"version": "1.0.0",
"private": true,
"description": "",
"name": "parser-lang",
"version": "0.1.0",
"description": "A parser combinator library for JavaScript with declarative definition power",
"main": "index.js",
"module": "main.js",
"keywords": ["parsing", "parse", "parser combinators", "template literals"],
"scripts": {
"lint": "prettier --check src/*.js",
"test": "ava"
},
"author": "",
"license": "ISC",
"author": "Tim Disney",
"license": "MIT",
"dependencies": {
"ava": "^2.1.0",
"esm": "^3.2.20"
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ParserLang is parser combinator library. It lets you make parsers by combining o
Its primary superpower is the ability to define parsers declaratively with template literals:

```js
import lang from 'parser-lang/lang';
import { lang } from 'parser-lang';

let { calc } = lang`
num = /[0-9]+/ > ${ch => parseInt(ch, 10)};
Expand Down

0 comments on commit 6c65312

Please sign in to comment.