sparksp / elm-syntax

Elm syntax in Elm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

elm-syntax

Elm Syntax in Elm: for parsing and writing Elm in Elm.

Used in:

Example

import Elm.Parser


src = """module Foo exposing(foo)

foo = 1
"""

parse : String -> String
parse input =
  case Elm.Parser.parse input of
    Err e ->
      "Failed: " ++ Debug.toString e
    Ok v ->
      "Success: " ++ Debug.toString v

main =
  parse src

About

Elm syntax in Elm

License:MIT License


Languages

Language:Elm 99.0%Language:JavaScript 0.5%Language:TypeScript 0.4%Language:Makefile 0.0%