@exercism/codemirror-lang-roc 0.0.0-stage → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs ADDED
@@ -0,0 +1,556 @@
1
+ 'use strict';
2
+
3
+ var lr = require('@lezer/lr');
4
+ var language = require('@codemirror/language');
5
+ var highlight = require('@lezer/highlight');
6
+ var autocomplete = require('@codemirror/autocomplete');
7
+ var common = require('@lezer/common');
8
+
9
+ // This file was generated by lezer-generator. You probably shouldn't edit it.
10
+ const callParen = 1,
11
+ unaryMinus = 192,
12
+ minus = 193,
13
+ Qualifier = 2,
14
+ spacedQuestion = 3;
15
+
16
+ const isLetter = (ch) => (ch >= 65 && ch <= 90) || (ch >= 97 && ch <= 122) || ch == 95;
17
+ const isIdentChar = (ch) => isLetter(ch) || (ch >= 48 && ch <= 57);
18
+ const isSpace = (ch) => ch == 32 || ch == 9 || ch == 10 || ch == 13 || ch < 0;
19
+ const OPEN_PAREN = 40, QUESTION = 63, MINUS = 45, GREATER = 62, DOT = 46;
20
+ // The characters that can end an expression. `(` straight after one of these
21
+ // calls it, as in `f(x)`, `Ok(1)`, `read!(n)` or `make()(x)`.
22
+ function endsExpression(ch) {
23
+ return isIdentChar(ch) || ch == 33 /* ! */ || ch == 41 /* ) */ || ch == 93 /* ] */ ||
24
+ ch == 125 /* } */ || ch == 39 /* ' */ || ch == 34 /* " */ || ch == 63 /* ? */;
25
+ }
26
+ const tokens = new lr.ExternalTokenizer((input, stack) => {
27
+ const next = input.next;
28
+ if (next == OPEN_PAREN) {
29
+ if (endsExpression(input.peek(-1)) && stack.canShift(callParen))
30
+ input.acceptToken(callParen, 1);
31
+ return;
32
+ }
33
+ // `a - 1` and `a-1` subtract, while `a -1` and `[-1]` start a negative number,
34
+ // as they do in Roc. Where only one of them fits, that one is used.
35
+ if (next == MINUS) {
36
+ const after = input.peek(1);
37
+ if (after == GREATER)
38
+ return;
39
+ const canUnary = stack.canShift(unaryMinus);
40
+ const canBinary = stack.canShift(minus);
41
+ if (!canUnary && !canBinary)
42
+ return;
43
+ const unary = canUnary && (!canBinary || (isSpace(input.peek(-1)) && !isSpace(after)));
44
+ input.acceptToken(unary ? unaryMinus : minus, 1);
45
+ return;
46
+ }
47
+ // `x?` returns the error early, and `x ? |e| Other(e)` or `x ? Str.inspect`
48
+ // changes the error first. A space before the `?` tells them apart.
49
+ if (next == QUESTION) {
50
+ if (input.peek(1) != QUESTION && isSpace(input.peek(-1)) && stack.canShift(spacedQuestion))
51
+ input.acceptToken(spacedQuestion, 1);
52
+ return;
53
+ }
54
+ // `List.map`, `Str.Utf8Problem` and `Random.Generator(U8)` start with the name
55
+ // of a module or a type. `Foo.{ ... }` is a nominal record, so it doesn't.
56
+ if (next >= 65 && next <= 90) {
57
+ let len = 1;
58
+ while (isIdentChar(input.peek(len)))
59
+ len++;
60
+ if (input.peek(len) == DOT && isLetter(input.peek(len + 1)) && stack.canShift(Qualifier))
61
+ input.acceptToken(Qualifier, len);
62
+ }
63
+ }, { contextual: true });
64
+
65
+ // This file was generated by lezer-generator. You probably shouldn't edit it.
66
+ const spec_lowerIdent = {__proto__:null,import:16, _:46, where:138, var:150, expect:156, break:160, continue:164, and:230, or:232, as:260, if:274, else:276, match:280, return:290, crash:294, dbg:298, for:302, "for!":304, in:306, while:310, exposing:316, app:325, platform:331, module:335, package:339};
67
+ const parser = lr.LRParser.deserialize({
68
+ version: 14,
69
+ states: "!1xQ]QROOO'QQRO'#CjOOQP'#Ck'#CkO'eQRO'#ClO+rQQO'#GOO+wQRO'#CmO-vQRO'#CpO1{QRO'#CvO2SQRO'#CzO4QQRO'#C|O4_QRO'#DTO4mQQO'#DpO6`QRO'#DvO8qQQO'#DuOOQP'#Gr'#GrO<bQRO'#GlOOQP'#E^'#E^OOQP'#E_'#E_O0_QRO'#E]O>PQRO'#EyO0_QRO'#EwOOQP'#Gl'#GlO>WOWO'#CeOOQP'#Gh'#GhOOQP'#F|'#F|Q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xQ!ybQ#XdQ#akQ#bnQ#coQ#dpQ#eqQ#frQ#htQ#y!VQ$d!mQ$e!nQ$f!oQ$g!pQ$h!qQ$i!rQ$j!sQ$k!tQ$l!uQ$m!vQ%X#YQ%]#bU%o#t%p'eQ%r#xQ&|%[Q'U%`Q(b&}Q)i(fQ)l(hQ*R)gQ*U+OQ*V+PQ*W+QQ*X+RQ*Y+SQ*`)wQ*i*SQ*j+TQ*k+UQ*l+VQ*m+WQ*n+XQ*o+YQ*p+ZQ*q+[Q*r+]Q*s+_Q*v*aQ*}+bR+_+dQ!RVQ!SWQ$`!cR$p!xQ!ZXR$o!wS!YX!wV%s#z%t'fSgOiZ![X!]%a&`(OR$R!^Q$]!_Q$_!aQ&b$^S'|&_+aS(}'k'lS)['{+cQ)n(oQ)x)OR*|*w[$Z!_!a$^&_'{(o[&W$X%z'u'v)Y)|Q'y&]]+`'k'l)O*w+a+cQ&Z$XR'j%zS&Y$X%zQ)W'uV)X'v)Y)|Q&_$ZQ'u&WQ'{&^Q+a+`R+c+eQ&R$VV)P'n)R)zR&V$WQ#WcQ%P#SQ&k$vQ&l$wQ(R&hR(S&i[#Vc#S$v$w&h&iQ#gsQ%Q#TU&w%T&x(aS'Q%^'SQ(W&nU(]&t(_)dR)e(dQ%O#RQ&m$xR(T&jR%S#TR%k#oR'd%l",
72
+ nodeNames: "⚠ ( Qualifier ? LineComment DocComment Program ImportStatement import String Escape } Interpolation InterpolationStart VariableName MutableName Tag ScopedName . Number MultilineString MultilineStringLine Char Wildcard ] [ List , ) ( ParenExpression { Record RecordField FieldName : Spread .. Block TypeDefinition TypeDefName TypeParams TypeVariable :: := TypeName ScopedType TypeApplication TypeArgs InnerFunctionType -> => * RecordType FieldType ? DefaultOp ?? RestType TagUnionType TagType TagName TupleType FunctionType .{ MethodsBlock TypeAnnotation AnnotationName WhereClause where WhereItem Assignment AssignTarget = VarStatement var VariableDefinition ExpectStatement expect BreakStatement break ContinueStatement continue NominalRecord NominalValue .( CallExpression ArgList MemberExpression .? PropertyName TagName TryExpression UnaryExpression ArithOp LogicOp ! BinaryExpression ArithOp / // % ArithOp + ArithOp RangeOp ..= ..< CompareOp == != < > <= >= and or PipeOp |> Lambda | ParamList PatternVariable NegativeNumber TagPattern TagName NominalPattern TagName FieldPattern RestPattern as RecordPattern TuplePattern ListPattern AsPattern || IfExpression if else MatchExpression match MatchBody MatchArm Guard ReturnExpression return CrashExpression crash DbgExpression dbg ForStatement for for! in WhileStatement while PackageName ModuleName exposing ExposingList ExposedName AppHeader app PackageList Package platform ModuleHeader module PackageHeader package",
73
+ maxTerm: 221,
74
+ nodeProps: [
75
+ ["group", -4,7,161,166,168,"Statement",-28,9,14,15,16,17,19,20,22,23,26,30,32,38,83,84,86,88,92,93,97,119,136,139,144,146,148,150,154,"Expression Statement Statement",-7,39,66,71,74,77,79,81,"Statement Statement"],
76
+ ["openedBy", 11,"{ .{",24,"[",28,"("],
77
+ ["closedBy", 25,"]",29,")",-2,31,64,"}"]
78
+ ],
79
+ skippedNodes: [0,4,5],
80
+ repeatNodeCount: 21,
81
+ tokenData: "4i~RxX^#opq#oqr$drs$qst$vtu&auv'Twx'Yxy)fyz)kz{)p{|)u|})z}!O*P!O!P*[!P!Q+c!Q!R+p!R![.V![!]0`!^!_0u!_!`1S!`!a1i!a!b1v!c!}2T!}#O2f#O#P2k#P#Q3Y#R#S3_#T#o3_#o#p3x#p#q3}#q#r4d#y#z#o$f$g#o#BY#BZ#o$IS$I_#o$I|$JO#o$JT$JU#o$KV$KW#o&FU&FV#o~#tY%Z~X^#opq#o#y#z#o$f$g#o#BY#BZ#o$IS$I_#o$I|$JO#o$JT$JU#o$KV$KW#o&FU&FV#o~$iP#S~!_!`$l~$qO#b~~$vO%^~~${US~OY%_Zs%_st%vt;'S%_;'S;=`%p<%lO%_~%dSS~OY%_Z;'S%_;'S;=`%p<%lO%_~%sP;=`<%l%_~%}ST~S~OY%vZ;'S%v;'S;=`&Z<%lO%v~&^P;=`<%l%v~&dQ#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q![3_!c!}3_#R#S3_#T#o3_~3xO%]~~3}Oo~~4SQ#l~!`!a4Y#p#q4_~4_O#j~~4dO#{~~4iOZ~",
82
+ tokenizers: [tokens, 1, 2, new lr.LocalTokenGroup("#R~RRrs[tua#O#Pl~aO%s~~dP#o#pg~lO]~~oTO#i!O#i#j!T#j;'S!O;'S;=`!x;=`O!O~!TOY~~!YPY~xy!]~!`R!Q![!i!c!i!i#T#Z!i~!lSyz!O!Q![!i!c!i!i#T#Z!i~!}PY~;=`<%l!O~", 94, 199)],
83
+ topRules: {"Program":[0,6]},
84
+ dynamicPrecedences: {"32":1,"161":1,"166":1,"168":1},
85
+ specialized: [{term: 197, get: (value) => spec_lowerIdent[value] || -1}],
86
+ tokenPrec: 7661
87
+ });
88
+
89
+ // The members of the builtin modules, read from src/build/roc/Builtin.roc in
90
+ // https://github.com/roc-lang/roc at commit c7ecd313018077e465873b25068e9fb534ea7835 (2026-11-24T18:04:47Z).
91
+ // Each module lists its functions, the types it holds and its tags.
92
+ const w = (s) => s.split(" ");
93
+ const modules = {
94
+ Str: {
95
+ values: w("parser_for encoder_for len is_empty concat contains trim trim_start trim_end caseless_ascii_equals with_ascii_lowercased with_ascii_uppercased starts_with ends_with repeat with_prefix drop_prefix drop_prefix_caseless_ascii drop_suffix split_first split_last replace_each replace_first replace_last count_utf8_bytes iter_utf8 drop_first_bytes drop_last_bytes with_capacity reserve release_excess_capacity to_utf8 to_str from_utf8_lossy from_utf8 from_utf16_le from_utf16_le_lossy from_utf16_be from_utf16_be_lossy from_utf16_bom from_utf16_bom_lossy from_utf32_le from_utf32_le_lossy from_utf32_be from_utf32_be_lossy from_utf32_bom from_utf32_bom_lossy from_quote from_interpolation split_on join_with is_eq to_hash inspect encode decode"),
96
+ types: w("Utf8Problem Utf16Problem Utf32Problem"),
97
+ },
98
+ List: {
99
+ values: w("parser_for len capacity is_empty iter iter_rev from_iter concat join join_map intersperse with_capacity reserve release_excess_capacity sort sort_by sort_with sort_reversed sort_by_reversed sort_with_reversed is_eq to_hash append append_if_ok append_range_within copy_range_within append_sublist prepend_if_ok prepend first get prefetched subscript get_wrap set replace update swap insert rev for_each! map map_with_index map2 map3 map4 keep_if drop_if keep_until keep_while keep_oks keep_errs count_if map_try map_try! keep_if_try keep_if_try! fold_try fold_try! fold fold_with_index fold_until fold_with_index_until fold_rev starts_with ends_with any contains all last single drop_at drop_swap sublist chunks_of take_first clear take_last drop_first drop_last find_first find_last find_first_index find_last_index split_at split_on split_if split_on_list split_first split_last repeat sum min max encoder_for decode"),
100
+ },
101
+ Dict: {
102
+ values: w("parser_for encoder_for is_eq to_hash to_inspect empty with_capacity capacity reserve release_excess_capacity clear single len is_empty get subscript contains insert remove to_list iter iter_rev from_list from_iter keys values fold fold_until keep_if drop_if map join_map insert_all keep_shared remove_all update"),
103
+ },
104
+ Set: {
105
+ values: w("parser_for encoder_for is_eq to_hash to_inspect empty single len is_empty contains insert remove to_list fold iter iter_rev from_list keep_if drop_if union intersection difference map with_capacity capacity reserve release_excess_capacity clear subscript from_iter fold_until join_map"),
106
+ },
107
+ Try: {
108
+ values: w("parser_for encoder_for is_ok is_err ok_or err_or map_ok map_ok! map_err map_err! map_both map_both! map2 map2! on_err on_err! catch catch! collapse is_eq to_hash"),
109
+ tags: w("Ok Err"),
110
+ },
111
+ Bool: {
112
+ values: w("parser_for encoder_for not is_eq to_hash encode decode"),
113
+ tags: w("False True"),
114
+ },
115
+ Box: {
116
+ values: w("parser_for encoder_for box unbox"),
117
+ },
118
+ Iter: {
119
+ values: w("custom iter single prepended concat append next map with_index keep_if drop_if fold sum product min max len_if_known collect stream take_first drop_first step_by"),
120
+ },
121
+ Stream: {
122
+ values: w("from_iter custom map map! with_index keep_if drop_if take_first drop_first stream fold! for_each! next! len_if_known collect!"),
123
+ },
124
+ Hasher: {
125
+ values: w("write_bool write_u8 write_u16 write_u32 write_u64 write_u128 write_i8 write_i16 write_i32 write_i64 write_i128 write_f32 write_f64 write_dec write_bytes write_str"),
126
+ },
127
+ U8: {
128
+ values: w("parser_for encoder_for default highest lowest to_str is_zero is_eq to_hash is_gt is_gte is_lt is_lte order_relative_to is_even is_odd is_multiple_of max min plus plus_wrap plus_overflows plus_try range_len_if_known range_iter range_exclusive_to range_inclusive_to range_exclusive_from range_inclusive_from plus_saturated minus minus_wrap minus_overflows minus_try minus_saturated times times_wrap times_overflows times_try times_saturated pow pow_try div_by div_try div_ceil_by div_ceil_try div_floor_by div_trunc_by rem_by mod_by abs_diff shl_wrap shr_wrap shr_zf_wrap bitwise_and bitwise_or bitwise_xor bitwise_not count_leading_zero_bits count_trailing_zero_bits count_one_bits from_int_digits from_numeral from_str from_str_prefix from_utf8_prefix to until to_i8_wrap to_i8_try to_i16 to_i32 to_i64 to_i128 to_u8 to_u8_try to_u8_wrap to_u16 to_u32 to_u64 to_u128 to_f32 to_f64 to_dec encode decode"),
129
+ },
130
+ I8: {
131
+ values: w("parser_for encoder_for default highest lowest to_str is_zero is_negative is_positive is_eq to_hash is_gt is_gte is_lt is_lte order_relative_to is_even is_odd is_multiple_of max min negate abs plus plus_wrap plus_overflows plus_try range_len_if_known range_iter range_exclusive_to range_inclusive_to range_exclusive_from range_inclusive_from plus_saturated minus minus_wrap minus_overflows minus_try minus_saturated times times_wrap times_overflows times_try times_saturated pow pow_try div_by div_try div_ceil_by div_ceil_try div_floor_by div_trunc_by rem_by mod_by abs_diff shl_wrap shr_wrap shr_zf_wrap bitwise_and bitwise_or bitwise_xor bitwise_not count_leading_zero_bits count_trailing_zero_bits count_one_bits to until from_int_digits from_numeral from_str from_str_prefix from_utf8_prefix to_i8 to_i8_try to_i8_wrap to_i16 to_i32 to_i64 to_i128 to_u8_wrap to_u8_try to_u16_wrap to_u16_try to_u32_wrap to_u32_try to_u64_wrap to_u64_try to_u128_wrap to_u128_try to_f32 to_f64 to_dec encode decode"),
132
+ },
133
+ U16: {
134
+ values: w("parser_for encoder_for default highest lowest to_str is_zero is_eq to_hash is_gt is_gte is_lt is_lte order_relative_to is_even is_odd is_multiple_of max min plus plus_wrap plus_overflows plus_try range_len_if_known range_iter range_exclusive_to range_inclusive_to range_exclusive_from range_inclusive_from plus_saturated minus minus_wrap minus_overflows minus_try minus_saturated times times_wrap times_overflows times_try times_saturated pow pow_try div_by div_try div_ceil_by div_ceil_try div_floor_by div_trunc_by rem_by mod_by abs_diff shl_wrap shr_wrap shr_zf_wrap bitwise_and bitwise_or bitwise_xor bitwise_not count_leading_zero_bits count_trailing_zero_bits count_one_bits from_le_bytes to until from_int_digits from_numeral from_str from_str_prefix from_utf8_prefix to_i8_wrap to_i8_try to_i16_wrap to_i16_try to_i32 to_i64 to_i128 to_u8_wrap to_u8_try to_u16 to_u16_try to_u16_wrap to_u32 to_u64 to_u128 to_f32 to_f64 to_dec encode decode"),
135
+ },
136
+ I16: {
137
+ values: w("parser_for encoder_for default highest lowest to_str is_zero is_negative is_positive is_eq to_hash is_gt is_gte is_lt is_lte order_relative_to is_even is_odd is_multiple_of max min negate abs plus plus_wrap plus_overflows plus_try range_len_if_known range_iter range_exclusive_to range_inclusive_to range_exclusive_from range_inclusive_from plus_saturated minus minus_wrap minus_overflows minus_try minus_saturated times times_wrap times_overflows times_try times_saturated pow pow_try div_by div_try div_ceil_by div_ceil_try div_floor_by div_trunc_by rem_by mod_by abs_diff shl_wrap shr_wrap shr_zf_wrap bitwise_and bitwise_or bitwise_xor bitwise_not count_leading_zero_bits count_trailing_zero_bits count_one_bits from_le_bytes to until from_int_digits from_numeral from_str from_str_prefix from_utf8_prefix to_i8_wrap to_i8_try to_i16 to_i16_try to_i16_wrap to_i32 to_i64 to_i128 to_u8_wrap to_u8_try to_u16_wrap to_u16_try to_u32_wrap to_u32_try to_u64_wrap to_u64_try to_u128_wrap to_u128_try to_f32 to_f64 to_dec encode decode"),
138
+ },
139
+ U32: {
140
+ values: w("parser_for encoder_for default highest lowest to_str is_zero is_eq to_hash is_gt is_gte is_lt is_lte order_relative_to is_even is_odd is_multiple_of max min plus plus_wrap plus_overflows plus_try range_len_if_known range_iter range_exclusive_to range_inclusive_to range_exclusive_from range_inclusive_from plus_saturated minus minus_wrap minus_overflows minus_try minus_saturated times times_wrap times_overflows times_try times_saturated pow pow_try div_by div_try div_ceil_by div_ceil_try div_floor_by div_trunc_by rem_by mod_by abs_diff shl_wrap shr_wrap shr_zf_wrap bitwise_and bitwise_or bitwise_xor bitwise_not count_leading_zero_bits count_trailing_zero_bits count_one_bits from_le_bytes to until from_int_digits from_numeral from_str from_str_prefix from_utf8_prefix to_i8_wrap to_i8_try to_i16_wrap to_i16_try to_i32_wrap to_i32_try to_i64 to_i128 to_u8_wrap to_u8_try to_u16_wrap to_u16_try to_u32 to_u32_try to_u32_wrap to_u64 to_u128 to_f32 to_f64 to_dec encode decode"),
141
+ },
142
+ I32: {
143
+ values: w("parser_for encoder_for default highest lowest to_str is_zero is_negative is_positive is_eq to_hash is_gt is_gte is_lt is_lte order_relative_to is_even is_odd is_multiple_of max min negate abs plus plus_wrap plus_overflows plus_try range_len_if_known range_iter range_exclusive_to range_inclusive_to range_exclusive_from range_inclusive_from plus_saturated minus minus_wrap minus_overflows minus_try minus_saturated times times_wrap times_overflows times_try times_saturated pow pow_try div_by div_try div_ceil_by div_ceil_try div_floor_by div_trunc_by rem_by mod_by abs_diff shl_wrap shr_wrap shr_zf_wrap bitwise_and bitwise_or bitwise_xor bitwise_not count_leading_zero_bits count_trailing_zero_bits count_one_bits from_le_bytes to until from_int_digits from_numeral from_str from_str_prefix from_utf8_prefix to_i8_wrap to_i8_try to_i16_wrap to_i16_try to_i32 to_i32_try to_i32_wrap to_i64 to_i128 to_u8_wrap to_u8_try to_u16_wrap to_u16_try to_u32_wrap to_u32_try to_u64_wrap to_u64_try to_u128_wrap to_u128_try to_f32 to_f64 to_dec encode decode"),
144
+ },
145
+ U64: {
146
+ values: w("parser_for encoder_for default highest lowest to_str is_zero is_eq to_hash is_gt is_gte is_lt is_lte order_relative_to is_even is_odd is_multiple_of max min plus plus_wrap plus_overflows plus_try range_len_if_known range_iter range_exclusive_to range_inclusive_to range_exclusive_from range_inclusive_from plus_saturated minus minus_wrap minus_overflows minus_try minus_saturated times times_wrap times_overflows times_try times_saturated pow pow_try div_by div_try div_ceil_by div_ceil_try div_floor_by div_trunc_by rem_by mod_by abs_diff shl_wrap shr_wrap shr_zf_wrap bitwise_and bitwise_or bitwise_xor bitwise_not count_leading_zero_bits count_trailing_zero_bits count_one_bits from_le_bytes append_le_bytes_to to until from_int_digits from_numeral from_str from_str_prefix from_utf8_prefix to_i8_wrap to_i8_try to_i16_wrap to_i16_try to_i32_wrap to_i32_try to_i64_wrap to_i64_try to_i128 to_u8_wrap to_u8_try to_u16_wrap to_u16_try to_u32_wrap to_u32_try to_u64 to_u64_try to_u64_wrap to_u128 to_f32 to_f64 to_dec encode decode"),
147
+ },
148
+ I64: {
149
+ values: w("parser_for encoder_for default highest lowest to_str is_zero is_negative is_positive is_eq to_hash is_gt is_gte is_lt is_lte order_relative_to is_even is_odd is_multiple_of max min negate abs plus plus_wrap plus_overflows plus_try range_len_if_known range_iter range_exclusive_to range_inclusive_to range_exclusive_from range_inclusive_from plus_saturated minus minus_wrap minus_overflows minus_try minus_saturated times times_wrap times_overflows times_try times_saturated pow pow_try div_by div_try div_ceil_by div_ceil_try div_floor_by div_trunc_by rem_by mod_by abs_diff shl_wrap shr_wrap shr_zf_wrap bitwise_and bitwise_or bitwise_xor bitwise_not count_leading_zero_bits count_trailing_zero_bits count_one_bits from_le_bytes to until from_int_digits from_numeral from_str from_str_prefix from_utf8_prefix to_i8_wrap to_i8_try to_i16_wrap to_i16_try to_i32_wrap to_i32_try to_i64 to_i64_try to_i64_wrap to_i128 to_u8_wrap to_u8_try to_u16_wrap to_u16_try to_u32_wrap to_u32_try to_u64_wrap to_u64_try to_u128_wrap to_u128_try to_f32 to_f64 to_dec encode decode"),
150
+ },
151
+ U128: {
152
+ values: w("parser_for encoder_for default highest lowest to_str is_zero is_eq to_hash is_gt is_gte is_lt is_lte order_relative_to is_even is_odd is_multiple_of max min plus plus_wrap plus_overflows plus_try range_len_if_known range_iter range_exclusive_to range_inclusive_to range_exclusive_from range_inclusive_from plus_saturated minus minus_wrap minus_overflows minus_try minus_saturated times times_wrap times_overflows times_try times_saturated pow pow_try div_by div_try div_ceil_by div_ceil_try div_floor_by div_trunc_by rem_by mod_by abs_diff shl_wrap shr_wrap shr_zf_wrap bitwise_and bitwise_or bitwise_xor bitwise_not count_leading_zero_bits count_trailing_zero_bits count_one_bits from_le_bytes to until from_int_digits from_numeral from_str from_str_prefix from_utf8_prefix to_i8_wrap to_i8_try to_i16_wrap to_i16_try to_i32_wrap to_i32_try to_i64_wrap to_i64_try to_i128_wrap to_i128_try to_u8_wrap to_u8_try to_u16_wrap to_u16_try to_u32_wrap to_u32_try to_u64_wrap to_u64_try to_u128 to_u128_try to_u128_wrap to_f32 to_f64 to_dec_try encode decode"),
153
+ },
154
+ I128: {
155
+ values: w("parser_for encoder_for default highest lowest to_str is_zero is_negative is_positive is_eq to_hash is_gt is_gte is_lt is_lte order_relative_to is_even is_odd is_multiple_of max min negate abs plus plus_wrap plus_overflows plus_try range_len_if_known range_iter range_exclusive_to range_inclusive_to range_exclusive_from range_inclusive_from plus_saturated minus minus_wrap minus_overflows minus_try minus_saturated times times_wrap times_overflows times_try times_saturated pow pow_try div_by div_try div_ceil_by div_ceil_try div_floor_by div_trunc_by rem_by mod_by abs_diff shl_wrap shr_wrap shr_zf_wrap bitwise_and bitwise_or bitwise_xor bitwise_not count_leading_zero_bits count_trailing_zero_bits count_one_bits from_le_bytes to until from_int_digits from_numeral from_str from_str_prefix from_utf8_prefix to_i8_wrap to_i8_try to_i16_wrap to_i16_try to_i32_wrap to_i32_try to_i64_wrap to_i64_try to_i128 to_i128_try to_i128_wrap to_u8_wrap to_u8_try to_u16_wrap to_u16_try to_u32_wrap to_u32_try to_u64_wrap to_u64_try to_u128_wrap to_u128_try to_f32 to_f64 to_dec_try encode decode"),
156
+ },
157
+ Dec: {
158
+ values: w("parser_for encoder_for default highest lowest e pi tau to_attos from_attos to_str is_zero is_negative is_positive is_eq to_hash is_gt is_gte is_lt is_lte order_relative_to max min is_approx_eq negate abs plus plus_try range_len_if_known range_iter range_exclusive_to range_inclusive_to range_exclusive_from range_inclusive_from plus_saturated minus minus_try minus_saturated times times_saturated pow sqrt sqrt_try sin cos tan asin acos atan atan2 div_by div_trunc_by div_floor_by rem_by abs_diff round round_try floor floor_try ceiling ceiling_try trunc round_to round_to_try round_to_i8_try round_to_i16_try round_to_i32_try round_to_i64_try round_to_i128 round_to_u8_try round_to_u16_try round_to_u32_try round_to_u64_try round_to_u128_try floor_to_i8_try floor_to_i16_try floor_to_i32_try floor_to_i64_try floor_to_i128 floor_to_u8_try floor_to_u16_try floor_to_u32_try floor_to_u64_try floor_to_u128_try ceiling_to_i8_try ceiling_to_i16_try ceiling_to_i32_try ceiling_to_i64_try ceiling_to_i128 ceiling_to_u8_try ceiling_to_u16_try ceiling_to_u32_try ceiling_to_u64_try ceiling_to_u128_try from_int_digits from_dec_digits from_numeral from_str from_str_prefix from_utf8_prefix to_i8_wrap to_i8_try to_i16_wrap to_i16_try to_i32_wrap to_i32_try to_i64_wrap to_i64_try to_i128 to_u8_wrap to_u8_try to_u16_wrap to_u16_try to_u32_wrap to_u32_try to_u64_wrap to_u64_try to_u128_wrap to_u128_try to_f32_wrap to_f32_try to_f64 to_dec to_dec_try to until encode decode"),
159
+ },
160
+ F32: {
161
+ values: w("parser_for encoder_for default highest lowest nan infinity e pi tau to_str to_bits from_bits is_nan is_infinite is_finite is_zero is_float_eq is_approx_eq is_eq to_hash is_negative is_positive is_gt is_gte is_lt is_lte max min negate abs sqrt sqrt_try pow sin cos tan asin acos atan atan2 plus minus times div_by div_trunc_by div_floor_by rem_by abs_diff round_to_i8_try round_to_i16_try round_to_i32_try round_to_i64_try round_to_i128_try round_to_u8_try round_to_u16_try round_to_u32_try round_to_u64_try round_to_u128_try floor_to_i8_try floor_to_i16_try floor_to_i32_try floor_to_i64_try floor_to_i128_try floor_to_u8_try floor_to_u16_try floor_to_u32_try floor_to_u64_try floor_to_u128_try ceiling_to_i8_try ceiling_to_i16_try ceiling_to_i32_try ceiling_to_i64_try ceiling_to_i128_try ceiling_to_u8_try ceiling_to_u16_try ceiling_to_u32_try ceiling_to_u64_try ceiling_to_u128_try from_int_digits from_dec_digits from_numeral range_len_if_known range_iter range_exclusive_to range_inclusive_to from_str from_str_prefix from_utf8_prefix to_i8_wrap to_i8_try to_i16_wrap to_i16_try to_i32_wrap to_i32_try to_i64_wrap to_i64_try to_i128_wrap to_i128_try to_u8_wrap to_u8_try to_u16_wrap to_u16_try to_u32_wrap to_u32_try to_u64_wrap to_u64_try to_u128_wrap to_u128_try to_f32 to_f32_wrap to_f32_try to_f64 encode decode"),
162
+ },
163
+ F64: {
164
+ values: w("parser_for encoder_for default highest lowest nan infinity e pi tau to_str to_bits from_bits is_nan is_infinite is_finite is_zero is_float_eq is_approx_eq is_eq to_hash is_negative is_positive is_gt is_gte is_lt is_lte max min negate abs sqrt sqrt_try pow sin cos tan asin acos atan atan2 plus minus times div_by div_trunc_by div_floor_by rem_by abs_diff round_to_i8_try round_to_i16_try round_to_i32_try round_to_i64_try round_to_i128_try round_to_u8_try round_to_u16_try round_to_u32_try round_to_u64_try round_to_u128_try floor_to_i8_try floor_to_i16_try floor_to_i32_try floor_to_i64_try floor_to_i128_try floor_to_u8_try floor_to_u16_try floor_to_u32_try floor_to_u64_try floor_to_u128_try ceiling_to_i8_try ceiling_to_i16_try ceiling_to_i32_try ceiling_to_i64_try ceiling_to_i128_try ceiling_to_u8_try ceiling_to_u16_try ceiling_to_u32_try ceiling_to_u64_try ceiling_to_u128_try from_int_digits from_dec_digits from_numeral range_len_if_known range_iter range_exclusive_to range_inclusive_to from_str from_str_prefix from_utf8_prefix to_i8_wrap to_i8_try to_i16_wrap to_i16_try to_i32_wrap to_i32_try to_i64_wrap to_i64_try to_i128_wrap to_i128_try to_u8_wrap to_u8_try to_u16_wrap to_u16_try to_u32_wrap to_u32_try to_u64_wrap to_u64_try to_u128_wrap to_u128_try to_f32_wrap to_f32_try to_f64 to_f64_wrap to_f64_try encode decode"),
165
+ },
166
+ Num: {
167
+ values: [],
168
+ types: w("Range U8 I8 U16 I16 U32 I32 U64 I64 U128 I128 Dec F32 F64"),
169
+ },
170
+ };
171
+ // Older Roc called `Try` `Result`, and many guides still do.
172
+ modules.Result = modules.Try;
173
+
174
+ /// Snippets for the constructs people write most often in Roc.
175
+ const snippets = [
176
+ autocomplete.snippetCompletion("${name} : ${Arg} -> ${Result}\n${name} = |${arg}| {\n\t${}\n}", {
177
+ label: "fn",
178
+ detail: "function with annotation",
179
+ type: "keyword",
180
+ }),
181
+ autocomplete.snippetCompletion("|${x}| ${}", { label: "|", detail: "lambda", type: "keyword" }),
182
+ autocomplete.snippetCompletion("match ${value} {\n\t${pattern} => ${}\n\t_ => ${}\n}", {
183
+ label: "match",
184
+ detail: "{ pattern => }",
185
+ type: "keyword",
186
+ }),
187
+ autocomplete.snippetCompletion("if ${condition} {\n\t${}\n} else {\n\t${}\n}", {
188
+ label: "if",
189
+ detail: "{ } else { }",
190
+ type: "keyword",
191
+ }),
192
+ autocomplete.snippetCompletion("if ${condition} ${then} else ${}", { label: "if", detail: "inline", type: "keyword" }),
193
+ autocomplete.snippetCompletion("for ${item} in ${list} {\n\t${}\n}", { label: "for", detail: "in", type: "keyword" }),
194
+ autocomplete.snippetCompletion("while ${condition} {\n\t${}\n}", { label: "while", detail: "loop", type: "keyword" }),
195
+ autocomplete.snippetCompletion("var $${name} = ${}", { label: "var", detail: "mutable variable", type: "keyword" }),
196
+ autocomplete.snippetCompletion("${Name} :: {}.{\n\t${}\n}", { label: "::", detail: "type module", type: "keyword" }),
197
+ autocomplete.snippetCompletion("${Name} := [${First}, ${Second}]", { label: ":=", detail: "tag union type", type: "keyword" }),
198
+ autocomplete.snippetCompletion("${Name} := {\n\t${field} : ${Type},\n}", { label: ":=", detail: "record type", type: "keyword" }),
199
+ autocomplete.snippetCompletion("expect {\n\t${}\n}", { label: "expect", detail: "test", type: "keyword" }),
200
+ autocomplete.snippetCompletion("import ${Module} exposing [${names}]", { label: "import", detail: "exposing", type: "keyword" }),
201
+ ];
202
+ const keywords = ("if else match for in while var return crash break continue expect dbg " +
203
+ "import exposing as and or where app module package platform")
204
+ .split(" ")
205
+ .map((label) => ({ label, type: "keyword" }));
206
+ function membersToCompletions(members) {
207
+ var _a, _b;
208
+ return [
209
+ ...members.values.map((label) => ({ label, type: "function" })),
210
+ ...((_a = members.types) !== null && _a !== void 0 ? _a : []).map((label) => ({ label, type: "type" })),
211
+ ...((_b = members.tags) !== null && _b !== void 0 ? _b : []).map((label) => ({ label, type: "enum" })),
212
+ ];
213
+ }
214
+ const builtinNames = [
215
+ ...Object.keys(modules).map((label) => ({ label, type: "type" })),
216
+ ...["Ok", "Err", "True", "False"].map((label) => ({ label, type: "enum" })),
217
+ ];
218
+ // Nodes whose text is not code. Inside a string, the code in `${...}` is code
219
+ // again, so completion works there.
220
+ const NotCode = new Set(["String", "MultilineString", "Char", "LineComment", "DocComment"]);
221
+ function inCode(state, pos) {
222
+ for (let node = language.syntaxTree(state).resolveInner(pos, -1); node; node = node.parent) {
223
+ if (node.name == "Interpolation" && pos > node.from + 1)
224
+ return true;
225
+ if (NotCode.has(node.name))
226
+ return false;
227
+ }
228
+ return true;
229
+ }
230
+ const Identifier = /^[\w$!]*$/;
231
+ // A word straight after a dot names a member of a module or a field, and the
232
+ // sources for bare names have nothing useful to say there.
233
+ function afterDot(context) {
234
+ const word = context.matchBefore(/[\w!]*/);
235
+ const from = word ? word.from : context.pos;
236
+ return from > 0 && context.state.sliceDoc(from - 1, from) == ".";
237
+ }
238
+ const fixedNames = autocomplete.completeFromList([...snippets, ...keywords, ...builtinNames]);
239
+ /// Keywords, snippets and the builtin types and tags. It offers nothing inside
240
+ /// strings and comments, or after a dot.
241
+ const rocCompletion = (context) => !inCode(context.state, context.pos) || afterDot(context) ? null : fixedNames(context);
242
+ // ── Modules and methods ───────────────────────────────────────────────────────
243
+ /// The members of a builtin module after its name and a dot: `List.` offers
244
+ /// `map` and `walk`, and `Str.` offers `split_on`.
245
+ const moduleCompletionSource = (context) => {
246
+ if (!inCode(context.state, context.pos))
247
+ return null;
248
+ const match = context.matchBefore(/(?:^|[^\w.$])([A-Z]\w*)\.[\w!]*$/);
249
+ if (!match)
250
+ return null;
251
+ const module = /([A-Z]\w*)\.[\w!]*$/.exec(match.text)[1];
252
+ const from = match.to - /[\w!]*$/.exec(match.text)[0].length;
253
+ const members = modules[module];
254
+ if (members)
255
+ return { from, options: membersToCompletions(members), validFor: Identifier };
256
+ const own = typeMembers(context.state, module);
257
+ return own.length ? { from, options: own, validFor: Identifier } : null;
258
+ };
259
+ /// The functions and types in the `.{ }` block of a type defined in the file,
260
+ /// such as `Clock :: { ... }.{ create = ... }`, for `Clock.`.
261
+ function typeMembers(state, name) {
262
+ const doc = state.doc;
263
+ const found = [];
264
+ language.syntaxTree(state).iterate({
265
+ enter(node) {
266
+ if (node.name != "TypeDefinition")
267
+ return;
268
+ const defName = node.node.getChild("TypeDefName");
269
+ const block = node.node.getChild("MethodsBlock");
270
+ if (!defName || !block || doc.sliceString(defName.from, defName.to) != name)
271
+ return;
272
+ found.push(...getScope(doc, block));
273
+ return false;
274
+ },
275
+ });
276
+ return found;
277
+ }
278
+ // Every function of the builtin types, for a method call such as `list.map`.
279
+ // Roc picks the function from the value's type, which completion can't know,
280
+ // so all of them are offered after the field names.
281
+ const allMethods = (() => {
282
+ const seen = new Set();
283
+ const found = [];
284
+ for (const members of Object.values(modules))
285
+ for (const label of members.values)
286
+ if (!seen.has(label)) {
287
+ seen.add(label);
288
+ found.push({ label, type: "method", boost: -1 });
289
+ }
290
+ return found;
291
+ })();
292
+ // A value that ends with one of these is a string or a list, so only that
293
+ // type's functions are offered.
294
+ function receiverType(text) {
295
+ if (/"$/.test(text))
296
+ return modules.Str;
297
+ if (/\]$/.test(text))
298
+ return modules.List;
299
+ return null;
300
+ }
301
+ /// After a value and a dot, as in `model.` or `"text".`: the field names
302
+ /// written in the file, then the builtin functions that can be called as
303
+ /// methods.
304
+ const fieldCompletionSource = (context) => {
305
+ if (!inCode(context.state, context.pos))
306
+ return null;
307
+ const match = context.matchBefore(/(?:[\w$!]+|[)\]}"])\.\??[\w!]*$/);
308
+ if (!match)
309
+ return null;
310
+ // `List.` names a module, and `1.` starts a number.
311
+ if (/^[A-Z0-9]/.test(match.text))
312
+ return null;
313
+ const word = /[\w!]*$/.exec(match.text)[0];
314
+ const from = match.to - word.length;
315
+ const doc = context.state.doc;
316
+ const seen = new Set();
317
+ const options = [];
318
+ language.syntaxTree(context.state).iterate({
319
+ enter(node) {
320
+ if (node.name != "FieldName")
321
+ return;
322
+ const label = doc.sliceString(node.from, node.to);
323
+ if (!label || seen.has(label) || node.to == context.pos)
324
+ return;
325
+ seen.add(label);
326
+ options.push({ label, type: "property" });
327
+ },
328
+ });
329
+ const known = receiverType(match.text.slice(0, match.text.lastIndexOf(".")));
330
+ if (known)
331
+ options.push(...known.values.map((label) => ({ label, type: "method" })));
332
+ else
333
+ options.push(...allMethods.filter((o) => !seen.has(o.label)));
334
+ return { from, options, validFor: Identifier };
335
+ };
336
+ // ── Names declared in the file ────────────────────────────────────────────────
337
+ // Every node here opens a scope: the names it binds are visible inside it and
338
+ // nowhere else. The functions of a type module are visible inside its `.{ }`
339
+ // block, and elsewhere through the type's name, as in `Clock.create`.
340
+ const ScopeNodes = new Set(["Program", "MethodsBlock", "Block", "Lambda", "MatchArm", "ForStatement"]);
341
+ // The names a pattern binds. In `{ value: d1, state } = step(s)` the left side
342
+ // is read as an expression, so its variables are the names it binds.
343
+ function boundNames(node, def) {
344
+ if (node.name == "PatternVariable" || node.name == "VariableName" || node.name == "MutableName")
345
+ def(node, "variable");
346
+ else if (node.name == "FieldName" || node.name == "TagName")
347
+ return;
348
+ else
349
+ for (let ch = node.firstChild; ch; ch = ch.nextSibling)
350
+ boundNames(ch, def);
351
+ }
352
+ function isFunctionType(node) {
353
+ return (node === null || node === void 0 ? void 0 : node.name) == "FunctionType";
354
+ }
355
+ // What a statement adds to the scope around it. The walk doesn't go inside these
356
+ // statements, because any names bound inside them are in a scope of their own.
357
+ const gatherers = {
358
+ Assignment(node, def) {
359
+ var _a, _b, _c;
360
+ const target = (_a = node.firstChild) === null || _a === void 0 ? void 0 : _a.firstChild;
361
+ const value = (_c = (_b = node.firstChild) === null || _b === void 0 ? void 0 : _b.nextSibling) === null || _c === void 0 ? void 0 : _c.nextSibling;
362
+ if ((target === null || target === void 0 ? void 0 : target.name) == "VariableName")
363
+ def(target, (value === null || value === void 0 ? void 0 : value.name) == "Lambda" ? "function" : "variable");
364
+ else if (target && target.name != "MutableName")
365
+ boundNames(target, def);
366
+ },
367
+ TypeAnnotation(node, def) {
368
+ var _a, _b;
369
+ const name = node.getChild("AnnotationName");
370
+ if (name)
371
+ def(name, isFunctionType((_b = (_a = name.nextSibling) === null || _a === void 0 ? void 0 : _a.nextSibling) !== null && _b !== void 0 ? _b : null) ? "function" : "variable");
372
+ },
373
+ VarStatement(node, def) {
374
+ const name = node.getChild("VariableDefinition");
375
+ if (name)
376
+ def(name, "variable");
377
+ },
378
+ TypeDefinition(node, def) {
379
+ const name = node.getChild("TypeDefName");
380
+ if (name)
381
+ def(name, "type");
382
+ const union = node.getChild("TagUnionType");
383
+ if (union)
384
+ for (const tag of union.getChildren("TagType"))
385
+ if (tag.firstChild)
386
+ def(tag.firstChild, "enum");
387
+ },
388
+ ImportStatement(node, def) {
389
+ const names = node.getChildren("ModuleName");
390
+ const name = names[names.length - 1];
391
+ if (name)
392
+ def(name, "namespace");
393
+ const exposing = node.getChild("ExposingList");
394
+ if (exposing)
395
+ for (const item of exposing.getChildren("ExposedName"))
396
+ def(item, "auto");
397
+ const file = node.getChild("PatternVariable");
398
+ if (file)
399
+ def(file, "variable");
400
+ },
401
+ };
402
+ // The names a scope node binds itself: a lambda's parameters, the variables in
403
+ // a `match` pattern and the item of a `for` loop.
404
+ function ownBindings(node, def) {
405
+ var _a;
406
+ switch (node.name) {
407
+ case "Lambda": {
408
+ const params = node.getChild("ParamList");
409
+ if (params)
410
+ boundNames(params, def);
411
+ break;
412
+ }
413
+ case "MatchArm":
414
+ for (let ch = node.firstChild; ch && ch.name != "Guard" && ch.name != "=>"; ch = ch.nextSibling)
415
+ boundNames(ch, def);
416
+ break;
417
+ case "ForStatement": {
418
+ const item = (_a = node.firstChild) === null || _a === void 0 ? void 0 : _a.nextSibling;
419
+ if (item)
420
+ boundNames(item, def);
421
+ break;
422
+ }
423
+ }
424
+ }
425
+ const cache = new common.NodeWeakMap();
426
+ function getScope(doc, node) {
427
+ const cached = cache.get(node);
428
+ if (cached)
429
+ return cached;
430
+ const completions = [];
431
+ const seen = new Set();
432
+ const def = (n, type) => {
433
+ const label = doc.sliceString(n.from, n.to);
434
+ if (!label || seen.has(label))
435
+ return;
436
+ seen.add(label);
437
+ completions.push({ label, type: type == "auto" ? (/^[A-Z]/.test(label) ? "type" : "function") : type });
438
+ };
439
+ ownBindings(node, def);
440
+ const walk = (parent) => {
441
+ for (let ch = parent.firstChild; ch; ch = ch.nextSibling) {
442
+ const gather = gatherers[ch.name];
443
+ if (gather)
444
+ gather(ch, def);
445
+ else if (!ScopeNodes.has(ch.name))
446
+ walk(ch);
447
+ }
448
+ };
449
+ walk(node);
450
+ cache.set(node, completions);
451
+ return completions;
452
+ }
453
+ /// Completes the names declared in the file that are in scope at the cursor:
454
+ /// functions and values, types and their tags, imports, parameters, and the
455
+ /// names bound by `match`, `for` and `var`.
456
+ const localCompletionSource = (context) => {
457
+ if (!inCode(context.state, context.pos) || afterDot(context))
458
+ return null;
459
+ const word = context.matchBefore(/\$[\w!]*|[\w!]+/);
460
+ if (!word && !context.explicit)
461
+ return null;
462
+ const inner = language.syntaxTree(context.state).resolveInner(context.pos, -1);
463
+ let options = [];
464
+ for (let pos = inner; pos; pos = pos.parent)
465
+ if (ScopeNodes.has(pos.name))
466
+ options = options.concat(getScope(context.state.doc, pos));
467
+ // The name being typed is in the tree as a name of its own, and offering it
468
+ // back as its own completion helps nobody.
469
+ if (word)
470
+ options = options.filter((o) => o.label != word.text);
471
+ return { options, from: word ? word.from : context.pos, validFor: Identifier };
472
+ };
473
+
474
+ const rocLanguage = language.LRLanguage.define({
475
+ name: "roc",
476
+ parser: parser.configure({
477
+ props: [
478
+ language.indentNodeProp.add({
479
+ "Block Record NominalRecord MatchBody MethodsBlock RecordType RecordPattern PackageList": language.delimitedIndent({ closing: "}" }),
480
+ "List ListPattern TagUnionType ExposingList WhereClause": language.delimitedIndent({ closing: "]" }),
481
+ "ArgList ParenExpression NominalValue TupleType TuplePattern TypeArgs": language.delimitedIndent({ closing: ")" }),
482
+ // A line that carries on an expression, such as `|> List.map(f)` or a
483
+ // branch of an `if` without braces, sits one step in.
484
+ "Assignment TypeAnnotation MatchArm Lambda": language.continuedIndent(),
485
+ IfExpression: language.continuedIndent({ except: /^\s*else\b/ }),
486
+ }),
487
+ language.foldNodeProp.add({
488
+ "Block Record NominalRecord MatchBody MethodsBlock RecordType PackageList": language.foldInside,
489
+ "List TagUnionType ExposingList ArgList": language.foldInside,
490
+ }),
491
+ highlight.styleTags({
492
+ "import exposing as app module package platform": highlight.tags.moduleKeyword,
493
+ "var where": highlight.tags.definitionKeyword,
494
+ "if else match for for! in while return crash break continue": highlight.tags.controlKeyword,
495
+ "expect dbg": highlight.tags.keyword,
496
+ "and or": highlight.tags.operatorKeyword,
497
+ Number: highlight.tags.number,
498
+ "String MultilineStringLine": highlight.tags.string,
499
+ Char: highlight.tags.character,
500
+ Escape: highlight.tags.escape,
501
+ "InterpolationStart Interpolation/}": highlight.tags.special(highlight.tags.brace),
502
+ LineComment: highlight.tags.lineComment,
503
+ DocComment: highlight.tags.docComment,
504
+ Wildcard: highlight.tags.atom,
505
+ "Qualifier ModuleName PackageName": highlight.tags.namespace,
506
+ VariableName: highlight.tags.variableName,
507
+ MutableName: highlight.tags.special(highlight.tags.variableName),
508
+ "AnnotationName VariableDefinition PatternVariable": highlight.tags.definition(highlight.tags.variableName),
509
+ "AssignTarget/VariableName AssignTarget/Record/VariableName": highlight.tags.definition(highlight.tags.variableName),
510
+ "AssignTarget/Record/RecordField/VariableName": highlight.tags.definition(highlight.tags.variableName),
511
+ "AssignTarget/ParenExpression/VariableName": highlight.tags.definition(highlight.tags.variableName),
512
+ "AssignTarget/MutableName": highlight.tags.definition(highlight.tags.special(highlight.tags.variableName)),
513
+ "CallExpression/VariableName CallExpression/ScopedName/VariableName": highlight.tags.function(highlight.tags.variableName),
514
+ "CallExpression/MemberExpression/PropertyName": highlight.tags.function(highlight.tags.propertyName),
515
+ "FieldName PropertyName": highlight.tags.propertyName,
516
+ "Tag TagName": highlight.tags.className,
517
+ TypeDefName: highlight.tags.definition(highlight.tags.typeName),
518
+ "TypeName TypeVariable": highlight.tags.typeName,
519
+ "ArithOp/... CompareOp/... RangeOp/... PipeOp/... DefaultOp/... LogicOp/...": highlight.tags.operator,
520
+ '"?"': highlight.tags.operator,
521
+ '"=" ":="': highlight.tags.definitionOperator,
522
+ '":" "::"': highlight.tags.typeOperator,
523
+ '"->" "=>" "|" "||"': highlight.tags.punctuation,
524
+ '".." "." ".?" ".{" ".("': highlight.tags.derefOperator,
525
+ ",": highlight.tags.separator,
526
+ "( )": highlight.tags.paren,
527
+ "[ ]": highlight.tags.squareBracket,
528
+ "{ }": highlight.tags.brace,
529
+ }),
530
+ ],
531
+ }),
532
+ languageData: {
533
+ commentTokens: { line: "#" },
534
+ closeBrackets: { brackets: ["(", "[", "{", '"', "'"] },
535
+ indentOnInput: /^\s*([\}\]\)]|else\b)$/,
536
+ },
537
+ });
538
+ /// Roc language support, with completion for keywords, snippets, the builtin
539
+ /// modules and the names declared in the file.
540
+ function roc() {
541
+ return new language.LanguageSupport(rocLanguage, [
542
+ rocLanguage.data.of({ autocomplete: rocCompletion }),
543
+ rocLanguage.data.of({ autocomplete: moduleCompletionSource }),
544
+ rocLanguage.data.of({ autocomplete: fieldCompletionSource }),
545
+ rocLanguage.data.of({ autocomplete: localCompletionSource }),
546
+ ]);
547
+ }
548
+
549
+ exports.fieldCompletionSource = fieldCompletionSource;
550
+ exports.localCompletionSource = localCompletionSource;
551
+ exports.moduleCompletionSource = moduleCompletionSource;
552
+ exports.parser = parser;
553
+ exports.roc = roc;
554
+ exports.rocCompletion = rocCompletion;
555
+ exports.rocLanguage = rocLanguage;
556
+ exports.snippets = snippets;