Stabel

Check-in [a58a08df5d]
Login
Overview
Comment:Rename Main.elm to TestCompiler.elm to make it more clear what the module's intended use case is.
Timelines: family | ancestors | descendants | both | module-definition
Files: files | file ages | folders
SHA3-256: a58a08df5d1bbb0a9b03687681e6e54e0c35250ae1ea36ea8d1c6ebbb1f6c4bd
User & Date: robin.hansen on 2021-05-05 12:42:30
Other Links: branch diff | manifest | tags
Context
2021-05-05
12:43
Update wabt to latest version. check-in: adcaa7ea6f user: robin.hansen tags: module-definition
12:42
Rename Main.elm to TestCompiler.elm to make it more clear what the module's intended use case is. check-in: a58a08df5d user: robin.hansen tags: module-definition
12:40
Fix compile error in Main.elm check-in: a4c0e85a20 user: robin.hansen tags: module-definition
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Modified package.json from [895cd12b4c] to [906f1f866f].

13
14
15
16
17
18
19
20
21
22
23
24
25
26
    "strip-indent": "^3.0.0",
    "wabt": "^1.0.20"
  },
  "scripts": {
    "test": "npm run test:elm && npm run test:wasm",
    "test:elm": "elm-test",
    "test:elm:watch": "elm-test --watch",
    "test:wasm": "elm make src/Main.elm --output wasm_tests/compiler.js && sed -i '' \"s/console.warn\\(.*\\);/\\/*&*\\//g\" wasm_tests/compiler.js && jest",
    "build": "elm make src/CLI.elm --output bin/compiler.js && sed -i '' \"s/console.warn\\(.*\\);/\\/*&*\\//g\" bin/compiler.js"
  },
  "bin": {
    "play": "bin/cli.js"
  }
}







|






13
14
15
16
17
18
19
20
21
22
23
24
25
26
    "strip-indent": "^3.0.0",
    "wabt": "^1.0.20"
  },
  "scripts": {
    "test": "npm run test:elm && npm run test:wasm",
    "test:elm": "elm-test",
    "test:elm:watch": "elm-test --watch",
    "test:wasm": "elm make src/TestCompiler.elm --output wasm_tests/compiler.js && sed -i '' \"s/console.warn\\(.*\\);/\\/*&*\\//g\" wasm_tests/compiler.js && jest",
    "build": "elm make src/CLI.elm --output bin/compiler.js && sed -i '' \"s/console.warn\\(.*\\);/\\/*&*\\//g\" bin/compiler.js"
  },
  "bin": {
    "play": "bin/cli.js"
  }
}

Modified src/TestCompiler.elm from [59c2c19d2d] to [3223a451b4].

1
2
3
4
5
6
7
8
port module Main exposing (main)

import Dict
import Platform exposing (Program)
import Play.Codegen as Codegen
import Play.Data.Metadata as Metadata
import Play.Parser as Parser
import Play.Parser.Problem as ParserProblem
|







1
2
3
4
5
6
7
8
port module TestCompiler exposing (main)

import Dict
import Platform exposing (Program)
import Play.Codegen as Codegen
import Play.Data.Metadata as Metadata
import Play.Parser as Parser
import Play.Parser.Problem as ParserProblem

Modified wasm_tests/compiler.wrapper.js from [8661e0e665] to [f024764ef8].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
const Compiler = require('./compiler.js');
const wabtInit = require('wabt');
const stripIndent = require('strip-indent');

exports.toWat = function toWat(entry, sourceCode) {
    return new Promise((resolve, reject) => {
        const compiler = Compiler.Elm.Main.init({});

        compiler.ports.compileFinished.subscribe(([ok, output]) => {
            if (ok) {
                resolve(output);
            } else {
                reject(output);
            }






|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
const Compiler = require('./compiler.js');
const wabtInit = require('wabt');
const stripIndent = require('strip-indent');

exports.toWat = function toWat(entry, sourceCode) {
    return new Promise((resolve, reject) => {
        const compiler = Compiler.Elm.TestCompiler.init({});

        compiler.ports.compileFinished.subscribe(([ok, output]) => {
            if (ok) {
                resolve(output);
            } else {
                reject(output);
            }