diff --git a/src/lib/data/index.js b/src/lib/data/index.js index c2c6f18..482b97d 100644 --- a/src/lib/data/index.js +++ b/src/lib/data/index.js @@ -6,9 +6,9 @@ * Licensed under the LGPL2 license. */ -import option from './option'; -import atry from './try'; -import unit from './unit'; +import option from './option.js'; +import atry from './try.js'; +import unit from './unit.js'; export default { option, diff --git a/src/lib/genlex/genlex.js b/src/lib/genlex/genlex.js index 2081294..c299dc6 100644 --- a/src/lib/genlex/genlex.js +++ b/src/lib/genlex/genlex.js @@ -1,7 +1,7 @@ -import response from "../parsec/response"; -import {F, C, N} from "../parsec"; -import unit from "../data/unit"; -import option from "../data/option"; +import response from "../parsec/response.js"; +import {F, C, N} from "../parsec/index.js"; +import unit from "../data/unit.js"; +import option from "../data/option.js"; export class TokenDefinition { diff --git a/src/lib/index.js b/src/lib/index.js index 90d8335..60d0821 100644 --- a/src/lib/index.js +++ b/src/lib/index.js @@ -6,16 +6,16 @@ * Licensed under the LGPL2 license. */ -import data from './data/index'; -import {GenLex,getMathGenLex} from './genlex/genlex'; -import parsec from './parsec/index'; -import Parser from './parsec/parser'; -import {F, C, N} from './parsec/index'; -import standard from './standard/index'; -import Streams from './stream/index'; +import data from './data/index.js'; +import {GenLex,getMathGenLex} from './genlex/genlex.js'; +import parsec from './parsec/index.js'; +import Parser from './parsec/parser.js'; +import {F, C, N} from './parsec/index.js'; +import standard from './standard/index.js'; +import Streams from './stream/index.js'; -import {accept, reject} from "./parsec/response"; -import {Tuple, isTuple, NEUTRAL, tuple} from "./data/tuple"; +import {accept, reject} from "./parsec/response.js"; +import {Tuple, isTuple, NEUTRAL, tuple} from "./data/tuple.js"; const JSON = standard.jsonParser; diff --git a/src/lib/parsec/chars-bundle.js b/src/lib/parsec/chars-bundle.js index 990685b..e0374f0 100644 --- a/src/lib/parsec/chars-bundle.js +++ b/src/lib/parsec/chars-bundle.js @@ -5,8 +5,8 @@ * Copyright (c) 2016 Didier Plaindoux * Licensed under the LGPL2 license. */ -import F from './flow-bundle'; -import {string} from './flow-bundle'; +import F from './flow-bundle.js'; +import {string} from './flow-bundle.js'; const ASCII_LETTER = Symbol('ASCII'); const OCCIDENTAL_LETTER = Symbol('OCCIDENTAL'); diff --git a/src/lib/parsec/flow-bundle.js b/src/lib/parsec/flow-bundle.js index 81ebe80..37a720a 100644 --- a/src/lib/parsec/flow-bundle.js +++ b/src/lib/parsec/flow-bundle.js @@ -6,9 +6,9 @@ * Licensed under the LGPL2 license. */ -import Parser, {eos} from './parser'; -import response from './response'; -import {NEUTRAL, Tuple} from "../data/tuple"; +import Parser, {eos} from './parser.js'; +import response from './response.js'; +import {NEUTRAL, Tuple} from "../data/tuple.js"; // (Stream 'c -> number -> Response 'a 'c) -> Parser 'a 'c function parse(p) { diff --git a/src/lib/parsec/index.js b/src/lib/parsec/index.js index 9ddcd23..c0faa25 100644 --- a/src/lib/parsec/index.js +++ b/src/lib/parsec/index.js @@ -6,11 +6,11 @@ * Licensed under the LGPL2 license. */ -import parser from './parser'; -import response from './response'; -import flow from './flow-bundle'; -import chars from './chars-bundle'; -import numbers from './numbers-bundle'; +import parser from './parser.js'; +import response from './response.js'; +import flow from './flow-bundle.js'; +import chars from './chars-bundle.js'; +import numbers from './numbers-bundle.js'; export const C = chars; export const F = flow; diff --git a/src/lib/parsec/numbers-bundle.js b/src/lib/parsec/numbers-bundle.js index de5d272..ceac44e 100644 --- a/src/lib/parsec/numbers-bundle.js +++ b/src/lib/parsec/numbers-bundle.js @@ -6,8 +6,8 @@ * Licensed under the LGPL2 license. */ -import C from './chars-bundle'; -import F from './flow-bundle'; +import C from './chars-bundle.js'; +import F from './flow-bundle.js'; // unit -> Parser number char function number() { diff --git a/src/lib/parsec/parser.js b/src/lib/parsec/parser.js index 6e2f302..85e3a9a 100644 --- a/src/lib/parsec/parser.js +++ b/src/lib/parsec/parser.js @@ -12,14 +12,14 @@ * http://research.microsoft.com/en-us/um/people/daan/download/papers/parsec-paper.pdf */ -import stream from '../stream/index'; +import stream from '../stream/index.js'; -import option from '../data/option'; +import option from '../data/option.js'; -import response from './response'; -import unit from "../data/unit"; -import {NEUTRAL, Tuple, isTuple} from "../data/tuple"; +import response from './response.js'; +import unit from "../data/unit.js"; +import {NEUTRAL, Tuple, isTuple} from "../data/tuple.js"; /** diff --git a/src/lib/standard/index.js b/src/lib/standard/index.js index 5b746d6..e627ca5 100644 --- a/src/lib/standard/index.js +++ b/src/lib/standard/index.js @@ -6,7 +6,7 @@ * Licensed under the LGPL2 license. */ -import jsonParser from './json/jsonparser'; +import jsonParser from './json/jsonparser.js'; export default { jsonParser diff --git a/src/lib/standard/json/jsonparser.js b/src/lib/standard/json/jsonparser.js index 90d1931..502f427 100644 --- a/src/lib/standard/json/jsonparser.js +++ b/src/lib/standard/json/jsonparser.js @@ -6,10 +6,10 @@ * Licensed under the LGPL2 license. */ -import {GenLex} from '../../genlex/genlex'; +import {GenLex} from '../../genlex/genlex.js'; + +import {F,C,N} from '../../parsec/index.js'; -import {F} from '../../parsec/index'; -import {C, N} from "../../parsec"; // // Facilities diff --git a/src/lib/stream/arraystream.js b/src/lib/stream/arraystream.js index 20fad77..a9a1b93 100644 --- a/src/lib/stream/arraystream.js +++ b/src/lib/stream/arraystream.js @@ -5,7 +5,7 @@ * Copyright (c) 2016 Didier Plaindoux * Licensed under the LGPL2 license. */ -import Stream from './stream'; +import Stream from './stream.js'; /** * Array stream class diff --git a/src/lib/stream/bufferedstream.js b/src/lib/stream/bufferedstream.js index 0b2e6b8..785bee9 100644 --- a/src/lib/stream/bufferedstream.js +++ b/src/lib/stream/bufferedstream.js @@ -5,7 +5,7 @@ * Copyright (c) 2016 Didier Plaindoux * Licensed under the LGPL2 license. */ -import Stream from './stream'; +import Stream from './stream.js'; /** * Buffered stream class diff --git a/src/lib/stream/index.js b/src/lib/stream/index.js index 440c8bc..81fb801 100644 --- a/src/lib/stream/index.js +++ b/src/lib/stream/index.js @@ -6,10 +6,10 @@ * Licensed under the LGPL2 license. */ -import stringStreamFactory from './stringstream'; -import arrayStreamFactory from './arraystream'; -import parserStreamFactory from './parserstream'; -import bufferedStreamFactory from './bufferedstream'; +import stringStreamFactory from './stringstream.js'; +import arrayStreamFactory from './arraystream.js'; +import parserStreamFactory from './parserstream.js'; +import bufferedStreamFactory from './bufferedstream.js'; export default { ofString: stringStreamFactory, diff --git a/src/lib/stream/parserstream.js b/src/lib/stream/parserstream.js index d75c09d..fe34302 100644 --- a/src/lib/stream/parserstream.js +++ b/src/lib/stream/parserstream.js @@ -6,8 +6,8 @@ * Licensed under the LGPL2 license. */ -import Stream from './stream'; -import option from '../data/option'; +import Stream from './stream.js'; +import option from '../data/option.js'; /** * ParserStream stream class diff --git a/src/lib/stream/stream.js b/src/lib/stream/stream.js index bf3b43c..9360534 100644 --- a/src/lib/stream/stream.js +++ b/src/lib/stream/stream.js @@ -6,7 +6,7 @@ * Licensed under the LGPL2 license. */ -import atry from '../data/try'; +import atry from '../data/try.js'; /** * Abstract methods: diff --git a/src/lib/stream/stringstream.js b/src/lib/stream/stringstream.js index 58b9065..6f34455 100644 --- a/src/lib/stream/stringstream.js +++ b/src/lib/stream/stringstream.js @@ -5,7 +5,7 @@ * Copyright (c) 2016 Didier Plaindoux * Licensed under the LGPL2 license. */ -import Stream from './stream'; +import Stream from './stream.js'; /** * String stream class