Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 4 additions & 39 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,9 @@
sudo: false

language: node_js
node_js: node

cache:
directories:
- elm-stuff/build-artifacts
- elm-stuff/packages
- sysconfcpus
os:
- linux

env: ELM_VERSION=0.18.0

before_install:
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
language: elm

install:
- node --version
- npm --version
- npm install -g elm@$ELM_VERSION [email protected]
- npm install -g elm-github-install
- git clone https://github.com/NoRedInk/elm-ops-tooling
- elm-ops-tooling/with_retry.rb elm package install --yes
# Faster compile on Travis.
- |
if [ ! -d sysconfcpus/bin ];
then
git clone https://github.com/obmarg/libsysconfcpus.git;
cd libsysconfcpus;
./configure --prefix=$TRAVIS_BUILD_DIR/sysconfcpus;
make && make install;
cd ..;
fi

before_script:
- cd tests && elm-github-install && $TRAVIS_BUILD_DIR/sysconfcpus/bin/sysconfcpus -n 2 elm-make --yes && cd ..

script:
- $TRAVIS_BUILD_DIR/sysconfcpus/bin/sysconfcpus -n 2 elm-test
- npm install -g [email protected]
- npm install -g [email protected]
- npm install -g [email protected]

notifications:
email: false
27 changes: 0 additions & 27 deletions elm-package.json

This file was deleted.

25 changes: 25 additions & 0 deletions elm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"type": "package",
"name": "sgdan/elm-ast",
"summary": "Port of Bogdanp/elm-ast to Elm 0.19",
"license": "BSD-3-Clause",
"version": "0.1.0",
"exposed-modules": [
"Ast",
"Ast.BinOp",
"Ast.Expression",
"Ast.Statement",
"Ast.Common"
],
"elm-version": "0.19.1 <= v < 0.20.0",
"dependencies": {
"andre-dietrich/parser-combinators": "3.2.0 <= v < 4.0.0",
"elm/core": "1.0.0 <= v < 2.0.0",
"elm-community/list-extra": "8.2.2 <= v < 9.0.0",
"pilatch/flip": "1.0.0 <= v < 2.0.0",
"rtfeldman/elm-hex": "1.0.0 <= v < 2.0.0"
},
"test-dependencies": {
"elm-explorations/test": "1.2.2 <= v < 2.0.0"
}
}
21 changes: 11 additions & 10 deletions example/Main.elm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module Main exposing (main)
import Ast
import Ast.Expression exposing (..)
import Ast.Statement exposing (..)
import Browser
import Html exposing (..)
import Html.Events exposing (..)
import Json.Decode as JD
Expand Down Expand Up @@ -36,7 +37,7 @@ update action model =
withChild : a -> List (Html Msg) -> Html Msg
withChild title children =
li []
[ pre [] [ text <| toString title ]
[ pre [] [ text <| Debug.toString title ]
, ul [] children
]

Expand All @@ -53,18 +54,18 @@ expression e =
, expression e2
]

e ->
li [] [ pre [] [ text <| toString e ] ]
e_ ->
li [] [ pre [] [ text <| Debug.toString e ] ]


statement : Statement -> Html Msg
statement (s, _) =
statement ( s, _ ) =
case s of
FunctionDeclaration _ e ->
withChild s [ expression e ]

s ->
li [] [ pre [] [ text <| toString s ] ]
s_ ->
li [] [ pre [] [ text <| Debug.toString s ] ]


tree : String -> Html Msg
Expand All @@ -74,7 +75,7 @@ tree m =
ul [] (List.map statement statements)

err ->
div [] [ text <| toString err ]
div [] [ text <| Debug.toString err ]


view : String -> Html Msg
Expand All @@ -85,10 +86,10 @@ view model =
]


main : Program Never String Msg
main : Program () String Msg
main =
Html.beginnerProgram
{ model = init
Browser.sandbox
{ init = init
, update = update
, view = view
}
22 changes: 0 additions & 22 deletions example/elm-package.json

This file was deleted.

Loading