|
@@ -20,13 +20,31 @@
|
|
* DEALINGS IN THE SOFTWARE.
|
|
* DEALINGS IN THE SOFTWARE.
|
|
*)
|
|
*)
|
|
|
|
|
|
|
|
+open Globals
|
|
open Ast
|
|
open Ast
|
|
open Type
|
|
open Type
|
|
open Common
|
|
open Common
|
|
open ExtList
|
|
open ExtList
|
|
open Error
|
|
open Error
|
|
|
|
|
|
-type pos = Globals.pos
|
|
|
|
|
|
+
|
|
|
|
+type sourcemap = {
|
|
|
|
+ sources : (string) DynArray.t;
|
|
|
|
+ sources_hash : (string, int) Hashtbl.t;
|
|
|
|
+ mappings : Rbuffer.t;
|
|
|
|
+
|
|
|
|
+ mutable source_last_pos : sourcemap_pos;
|
|
|
|
+ mutable print_comma : bool;
|
|
|
|
+ mutable output_last_col : int;
|
|
|
|
+ mutable output_current_col : int;
|
|
|
|
+ mutable current_expr : sourcemap_pos option;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+and sourcemap_pos = {
|
|
|
|
+ file : int;
|
|
|
|
+ line : int;
|
|
|
|
+ col : int;
|
|
|
|
+}
|
|
|
|
|
|
type ctx = {
|
|
type ctx = {
|
|
com : Common.context;
|
|
com : Common.context;
|