-
Notifications
You must be signed in to change notification settings - Fork 464
/
Copy pathformat_regression.js
77 lines (69 loc) · 1.64 KB
/
format_regression.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// Generated by ReScript, PLEASE EDIT WITH CARE
'use strict';
var Curry = require("../../lib/js/curry.js");
function peek_queue(param) {
throw {
RE_EXN_ID: "Assert_failure",
_1: [
"format_regression.res",
10,
22
],
Error: new Error()
};
}
function int_of_size(param) {
throw {
RE_EXN_ID: "Assert_failure",
_1: [
"format_regression.res",
11,
23
],
Error: new Error()
};
}
function take_queue(param) {
throw {
RE_EXN_ID: "Assert_failure",
_1: [
"format_regression.res",
12,
22
],
Error: new Error()
};
}
function format_pp_token(param, param$1) {
throw {
RE_EXN_ID: "Assert_failure",
_1: [
"format_regression.res",
13,
32
],
Error: new Error()
};
}
function advance_loop(state) {
while(true) {
var match = peek_queue(state.pp_queue);
var size = match.elem_size;
var size$1 = int_of_size(size);
if (size$1 < 0 && (state.pp_right_total - state.pp_left_total | 0) < state.pp_space_left) {
return ;
}
take_queue(state.pp_queue);
Curry._1(format_pp_token(state, size$1 < 0 ? 1000000010 : size$1), match.token);
state.pp_left_total = match.length + state.pp_left_total | 0;
continue ;
};
}
var pp_infinity = 1000000010;
exports.peek_queue = peek_queue;
exports.int_of_size = int_of_size;
exports.take_queue = take_queue;
exports.format_pp_token = format_pp_token;
exports.pp_infinity = pp_infinity;
exports.advance_loop = advance_loop;
/* No side effect */