stil4m/elm-syntax/7.0.5

NOTE: the latest version is 7.3.9

Elm.Syntax.Node

Abstract Syntax Nodes

Types

type Node a
= Node Range a

Base representation for a syntax node in a source file.

Functions

combine : (Node a -> Node b -> c) -> Node a -> Node b -> Node c

Combine two nodes, constructing a new node which will have the outer most range of the child nodes

range : Node a -> Range

Extract the range out of a Node a

value : Node a -> a

Extract the value (a) out of a Node a

map : (a -> b) -> Node a -> Node b

Map the value within a node leaving the range untouched

Serialization

encode : (a -> Value) -> Node a -> Value

Encode a Node into JSON

decoder : Decoder a -> Decoder (Node a)

A JSON decoder for Node