maierfelix / hevia-parser

A recursive descent Swift parser written in ES6
http://maierfelix.github.io/hevia-parser
BSD 2-Clause "Simplified" License
63 stars 2 forks source link

Hevia

A Swift Parser, written in ES6.


Build Status Swift Version NPM Version API Stability

Installation

npm install hevia

Or clone the source:

git clone https://github.com/maierfelix/hevia.git

Getting started

tokenize

Use tokenize(str) to tokenize a string


let tokens = hevia.tokenize("var a:Int = 10"); // returns array of tokens

parse

Use parse(tokens) to parse an array of tokens


let ast = hevia.parse(tokens); // returns ast