Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: f42801e3f6
Fetching contributors…

Cannot retrieve contributors at this time

30 lines (25 sloc) 0.833 kB
(* Copyright (c) 2012 Ashima Arts. All rights reserved.
* Author: David Sheets
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*)
type dialect = WebGL
type version = int * int * int
type accuracy = Best | Preprocess (*| Decomment | Minify | Pretty | Obfuscate *)
type bond = Error | Warn | Ignore
type language = {dialect:dialect;
version:version;
bond:bond;
}
let accuracy_of_string = function
| "best" -> Best
| "preprocess" -> Preprocess
| _ -> Best
let string_of_dialect = function
| WebGL -> "webgl"
let with_bond bond = fun lang -> { lang with bond }
let with_dialect = function
| "webgl" -> (fun lang -> { lang with dialect=WebGL })
| _ -> (fun lang -> lang)
let target_of_language ({dialect; version}) =
(string_of_dialect dialect, version)
Jump to Line
Something went wrong with that request. Please try again.