@devaloop/devalang 0.0.1-alpha.1 → 0.0.1-alpha.10

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.
Files changed (155) hide show
  1. package/.devalang +4 -0
  2. package/Cargo.toml +49 -45
  3. package/README.md +127 -46
  4. package/docs/CHANGELOG.md +172 -0
  5. package/docs/COMMANDS.md +60 -6
  6. package/docs/CONFIG.md +30 -0
  7. package/docs/ROADMAP.md +10 -7
  8. package/docs/SYNTAX.md +100 -18
  9. package/docs/TODO.md +31 -28
  10. package/examples/condition.deva +20 -0
  11. package/examples/group.deva +12 -0
  12. package/examples/index.deva +13 -4
  13. package/examples/loop.deva +16 -0
  14. package/examples/samples/hat-808.wav +0 -0
  15. package/examples/synth.deva +14 -0
  16. package/examples/variables.deva +9 -0
  17. package/out-tsc/bin/devalang.exe +0 -0
  18. package/out-tsc/scripts/version/fetch.js +1 -5
  19. package/package.json +5 -4
  20. package/project-version.json +3 -3
  21. package/rust/cli/build.rs +114 -28
  22. package/rust/cli/check.rs +96 -103
  23. package/rust/cli/init.rs +79 -0
  24. package/rust/cli/mod.rs +203 -1
  25. package/rust/cli/play.rs +193 -0
  26. package/rust/cli/template.rs +57 -0
  27. package/rust/config/loader.rs +13 -0
  28. package/rust/config/mod.rs +16 -0
  29. package/rust/core/audio/engine.rs +214 -0
  30. package/rust/core/audio/evaluator.rs +31 -0
  31. package/rust/core/audio/interpreter/arrow_call.rs +129 -0
  32. package/rust/core/audio/interpreter/call.rs +70 -0
  33. package/rust/core/audio/interpreter/condition.rs +69 -0
  34. package/rust/core/audio/interpreter/driver.rs +236 -0
  35. package/rust/core/audio/interpreter/let_.rs +19 -0
  36. package/rust/core/audio/interpreter/load.rs +18 -0
  37. package/rust/core/audio/interpreter/loop_.rs +67 -0
  38. package/rust/core/audio/interpreter/mod.rs +12 -0
  39. package/rust/core/audio/interpreter/sleep.rs +36 -0
  40. package/rust/core/audio/interpreter/spawn.rs +84 -0
  41. package/rust/core/audio/interpreter/tempo.rs +16 -0
  42. package/rust/core/audio/interpreter/trigger.rs +69 -0
  43. package/rust/core/audio/loader/mod.rs +1 -0
  44. package/rust/core/audio/loader/trigger.rs +52 -0
  45. package/rust/core/audio/mod.rs +6 -0
  46. package/rust/core/audio/player.rs +54 -0
  47. package/rust/core/audio/renderer.rs +54 -0
  48. package/rust/core/builder/mod.rs +70 -27
  49. package/rust/core/debugger/lexer.rs +27 -0
  50. package/rust/core/debugger/mod.rs +13 -49
  51. package/rust/core/debugger/preprocessor.rs +27 -0
  52. package/rust/core/debugger/store.rs +25 -0
  53. package/rust/core/error/mod.rs +60 -0
  54. package/rust/core/lexer/handler/arrow.rs +31 -0
  55. package/rust/core/lexer/handler/at.rs +21 -0
  56. package/rust/core/lexer/handler/brace.rs +41 -0
  57. package/rust/core/lexer/handler/colon.rs +21 -0
  58. package/rust/core/lexer/handler/comment.rs +30 -0
  59. package/rust/core/lexer/handler/dot.rs +21 -0
  60. package/rust/core/lexer/handler/driver.rs +230 -0
  61. package/rust/core/lexer/handler/identifier.rs +41 -0
  62. package/rust/core/lexer/handler/indent.rs +52 -0
  63. package/rust/core/lexer/handler/mod.rs +14 -0
  64. package/rust/core/lexer/handler/newline.rs +23 -0
  65. package/rust/core/lexer/handler/number.rs +31 -0
  66. package/rust/core/lexer/handler/operator.rs +44 -0
  67. package/rust/core/lexer/handler/string.rs +63 -0
  68. package/rust/core/lexer/mod.rs +37 -319
  69. package/rust/core/lexer/token.rs +86 -0
  70. package/rust/core/mod.rs +6 -2
  71. package/rust/core/parser/driver.rs +331 -0
  72. package/rust/core/parser/handler/arrow_call.rs +126 -0
  73. package/rust/core/parser/handler/at.rs +162 -0
  74. package/rust/core/parser/handler/bank.rs +41 -0
  75. package/rust/core/parser/handler/condition.rs +74 -0
  76. package/rust/core/parser/handler/dot.rs +112 -0
  77. package/rust/core/parser/handler/identifier/call.rs +41 -0
  78. package/rust/core/parser/handler/identifier/group.rs +75 -0
  79. package/rust/core/parser/handler/identifier/let_.rs +133 -0
  80. package/rust/core/parser/handler/identifier/mod.rs +51 -0
  81. package/rust/core/parser/handler/identifier/sleep.rs +33 -0
  82. package/rust/core/parser/handler/identifier/spawn.rs +41 -0
  83. package/rust/core/parser/handler/identifier/synth.rs +65 -0
  84. package/rust/core/parser/handler/loop_.rs +72 -0
  85. package/rust/core/parser/handler/mod.rs +8 -0
  86. package/rust/core/parser/handler/tempo.rs +47 -0
  87. package/rust/core/parser/mod.rs +3 -200
  88. package/rust/core/parser/statement.rs +96 -0
  89. package/rust/core/preprocessor/loader.rs +229 -0
  90. package/rust/core/preprocessor/mod.rs +2 -24
  91. package/rust/core/preprocessor/module.rs +42 -56
  92. package/rust/core/preprocessor/processor.rs +76 -0
  93. package/rust/core/preprocessor/resolver/bank.rs +41 -51
  94. package/rust/core/preprocessor/resolver/call.rs +123 -0
  95. package/rust/core/preprocessor/resolver/condition.rs +92 -0
  96. package/rust/core/preprocessor/resolver/driver.rs +227 -0
  97. package/rust/core/preprocessor/resolver/group.rs +61 -0
  98. package/rust/core/preprocessor/resolver/let_.rs +31 -0
  99. package/rust/core/preprocessor/resolver/loop_.rs +76 -67
  100. package/rust/core/preprocessor/resolver/mod.rs +12 -111
  101. package/rust/core/preprocessor/resolver/spawn.rs +58 -0
  102. package/rust/core/preprocessor/resolver/synth.rs +50 -0
  103. package/rust/core/preprocessor/resolver/tempo.rs +40 -61
  104. package/rust/core/preprocessor/resolver/trigger.rs +90 -154
  105. package/rust/core/preprocessor/resolver/value.rs +78 -0
  106. package/rust/core/shared/duration.rs +8 -0
  107. package/rust/core/shared/mod.rs +2 -0
  108. package/rust/core/shared/value.rs +28 -0
  109. package/rust/core/store/export.rs +28 -0
  110. package/rust/core/store/global.rs +39 -0
  111. package/rust/core/store/import.rs +28 -0
  112. package/rust/core/store/mod.rs +4 -0
  113. package/rust/core/store/variable.rs +28 -0
  114. package/rust/core/utils/mod.rs +2 -0
  115. package/rust/core/utils/path.rs +31 -0
  116. package/rust/core/utils/validation.rs +37 -0
  117. package/rust/lib.rs +161 -1
  118. package/rust/main.rs +46 -30
  119. package/rust/utils/file.rs +35 -0
  120. package/rust/utils/logger.rs +108 -34
  121. package/rust/utils/mod.rs +3 -2
  122. package/rust/utils/{loader.rs → spinner.rs} +2 -0
  123. package/rust/utils/watcher.rs +33 -0
  124. package/templates/minimal/.devalang +5 -0
  125. package/templates/minimal/README.md +202 -0
  126. package/templates/minimal/src/index.deva +2 -0
  127. package/templates/welcome/.devalang +5 -0
  128. package/templates/welcome/README.md +202 -0
  129. package/templates/welcome/samples/kick-808.wav +0 -0
  130. package/templates/welcome/src/index.deva +13 -0
  131. package/templates/welcome/src/variables.deva +5 -0
  132. package/typescript/scripts/version/fetch.ts +1 -6
  133. package/examples/exported.deva +0 -7
  134. package/rust/audio/mod.rs +0 -1
  135. package/rust/cli/new.rs +0 -1
  136. package/rust/core/parser/at.rs +0 -142
  137. package/rust/core/parser/bank.rs +0 -42
  138. package/rust/core/parser/dot.rs +0 -107
  139. package/rust/core/parser/identifer.rs +0 -91
  140. package/rust/core/parser/loop_.rs +0 -62
  141. package/rust/core/parser/tempo.rs +0 -42
  142. package/rust/core/parser/variable.rs +0 -129
  143. package/rust/core/preprocessor/dependencies.rs +0 -54
  144. package/rust/core/preprocessor/resolver/at.rs +0 -24
  145. package/rust/core/types/cli.rs +0 -160
  146. package/rust/core/types/mod.rs +0 -7
  147. package/rust/core/types/module.rs +0 -41
  148. package/rust/core/types/parser.rs +0 -73
  149. package/rust/core/types/statement.rs +0 -105
  150. package/rust/core/types/store.rs +0 -116
  151. package/rust/core/types/token.rs +0 -83
  152. package/rust/core/types/variable.rs +0 -32
  153. package/rust/runner/executer.rs +0 -44
  154. package/rust/runner/mod.rs +0 -1
  155. package/rust/utils/path.rs +0 -46
@@ -0,0 +1,230 @@
1
+ use crate::core::lexer::{
2
+ handler::{
3
+ arrow::handle_arrow_lexer, at::handle_at_lexer, brace::{ handle_lbrace_lexer, handle_rbrace_lexer }, colon::handle_colon_lexer, comment::handle_comment_lexer, dot::handle_dot_lexer, identifier::handle_identifier_lexer, indent::handle_indent_lexer, newline::handle_newline_lexer, number::handle_number_lexer, operator::handle_operator_lexer, string::handle_string_lexer
4
+ },
5
+ token::{ Token, TokenKind },
6
+ };
7
+
8
+ fn advance_char<I: Iterator<Item = char>>(
9
+ chars: &mut std::iter::Peekable<I>,
10
+ line: &mut usize,
11
+ column: &mut usize
12
+ ) -> Option<char> {
13
+ while let Some(c) = chars.next() {
14
+ if c == '\r' {
15
+ continue;
16
+ } else if c == '\n' {
17
+ // newline: don't increment column
18
+ } else {
19
+ *column += 1;
20
+ }
21
+ return Some(c);
22
+ }
23
+ None
24
+ }
25
+
26
+ pub fn handle_content_lexing(content: String) -> Result<Vec<Token>, String> {
27
+ let mut tokens = Vec::new();
28
+
29
+ let mut line = 1;
30
+ let mut column = 1;
31
+
32
+ let mut indent_stack: Vec<usize> = vec![0];
33
+ let mut current_indent = 0;
34
+ let mut at_line_start = true;
35
+
36
+ let mut chars = content.chars().peekable();
37
+
38
+ while chars.peek().is_some() {
39
+ if at_line_start {
40
+ handle_indent_lexer(
41
+ &mut chars,
42
+ &mut current_indent,
43
+ &mut indent_stack,
44
+ &mut tokens,
45
+ &mut line,
46
+ &mut column
47
+ );
48
+
49
+ at_line_start = false;
50
+ }
51
+
52
+ let Some(ch) = advance_char(&mut chars, &mut line, &mut column) else {
53
+ break;
54
+ };
55
+
56
+ match ch {
57
+ '\n' => {
58
+ handle_newline_lexer(
59
+ ch,
60
+ &mut chars,
61
+ &mut tokens,
62
+ &mut line,
63
+ &mut column,
64
+ &mut at_line_start,
65
+ &mut current_indent
66
+ );
67
+ }
68
+ ' ' | '\t' => {
69
+ // Already handled by indent_lexer
70
+ }
71
+ '#' => {
72
+ handle_comment_lexer(
73
+ ch,
74
+ &mut chars,
75
+ &mut current_indent,
76
+ &mut indent_stack,
77
+ &mut tokens,
78
+ &mut line,
79
+ &mut column
80
+ );
81
+ }
82
+ ':' => {
83
+ handle_colon_lexer(
84
+ ch,
85
+ &mut chars,
86
+ &mut current_indent,
87
+ &mut indent_stack,
88
+ &mut tokens,
89
+ &mut line,
90
+ &mut column
91
+ );
92
+ }
93
+ '=' | '!' | '<' | '>' => {
94
+ handle_operator_lexer(
95
+ ch,
96
+ &mut chars,
97
+ &mut current_indent,
98
+ &mut indent_stack,
99
+ &mut tokens,
100
+ &mut line,
101
+ &mut column
102
+ );
103
+ }
104
+ '-' => {
105
+ handle_arrow_lexer(
106
+ ch,
107
+ &mut chars,
108
+ &mut current_indent,
109
+ &mut indent_stack,
110
+ &mut tokens,
111
+ &mut line,
112
+ &mut column
113
+ );
114
+ }
115
+ '{' => {
116
+ handle_lbrace_lexer(
117
+ ch,
118
+ &mut chars,
119
+ &mut current_indent,
120
+ &mut indent_stack,
121
+ &mut tokens,
122
+ &mut line,
123
+ &mut column
124
+ );
125
+ }
126
+ '}' => {
127
+ handle_rbrace_lexer(
128
+ ch,
129
+ &mut chars,
130
+ &mut current_indent,
131
+ &mut indent_stack,
132
+ &mut tokens,
133
+ &mut line,
134
+ &mut column
135
+ );
136
+ }
137
+ '.' => {
138
+ handle_dot_lexer(
139
+ ch,
140
+ &mut chars,
141
+ &mut current_indent,
142
+ &mut indent_stack,
143
+ &mut tokens,
144
+ &mut line,
145
+ &mut column
146
+ );
147
+ }
148
+ '@' => {
149
+ handle_at_lexer(
150
+ ch,
151
+ &mut chars,
152
+ &mut current_indent,
153
+ &mut indent_stack,
154
+ &mut tokens,
155
+ &mut line,
156
+ &mut column
157
+ );
158
+ }
159
+ '\"' | '\'' => {
160
+ handle_string_lexer(
161
+ ch,
162
+ &mut chars,
163
+ &mut current_indent,
164
+ &mut indent_stack,
165
+ &mut tokens,
166
+ &mut line,
167
+ &mut column
168
+ );
169
+ }
170
+ c if c.is_ascii_digit() => {
171
+ handle_number_lexer(
172
+ c,
173
+ &mut chars,
174
+ &mut current_indent,
175
+ &mut indent_stack,
176
+ &mut tokens,
177
+ &mut line,
178
+ &mut column
179
+ );
180
+ }
181
+ c if c.is_ascii_alphabetic() => {
182
+ handle_identifier_lexer(
183
+ c,
184
+ &mut chars,
185
+ &mut current_indent,
186
+ &mut indent_stack,
187
+ &mut tokens,
188
+ &mut line,
189
+ &mut column
190
+ );
191
+ }
192
+ _ => {
193
+ // Ignore unknown char
194
+ }
195
+ }
196
+ }
197
+
198
+ while indent_stack.len() > 1 {
199
+ indent_stack.pop();
200
+ current_indent = *indent_stack.last().unwrap();
201
+ tokens.push(Token {
202
+ kind: TokenKind::Dedent,
203
+ lexeme: String::new(),
204
+ line,
205
+ column,
206
+ indent: current_indent,
207
+ });
208
+ }
209
+
210
+ tokens.push(Token {
211
+ kind: TokenKind::EOF,
212
+ lexeme: String::new(),
213
+ line: line + 1,
214
+ column: 0,
215
+ indent: 0,
216
+ });
217
+
218
+ // NOTE: Debug only
219
+ // for token in &tokens {
220
+ // println!(
221
+ // "{:?} @ line {}, col {}, indent {}",
222
+ // token.kind,
223
+ // token.line,
224
+ // token.column,
225
+ // token.indent
226
+ // );
227
+ // }
228
+
229
+ Ok(tokens)
230
+ }
@@ -0,0 +1,41 @@
1
+ use crate::core::lexer::token::{ Token, TokenKind };
2
+
3
+ pub fn handle_identifier_lexer(
4
+ char: char,
5
+ chars: &mut std::iter::Peekable<std::str::Chars>,
6
+ current_indent: &mut usize,
7
+ indent_stack: &mut Vec<usize>,
8
+ tokens: &mut Vec<Token>,
9
+ line: &mut usize,
10
+ column: &mut usize
11
+ ) {
12
+ let mut ident = char.to_string();
13
+
14
+ while let Some(&c) = chars.peek() {
15
+ if c.is_ascii_alphanumeric() || c == '_' {
16
+ ident.push(c);
17
+ chars.next();
18
+ *column += 1;
19
+ } else {
20
+ break;
21
+ }
22
+ }
23
+
24
+ let kind = match ident.as_str() {
25
+ "if" => TokenKind::If,
26
+ "else" => TokenKind::Else,
27
+ "bank" => TokenKind::Bank,
28
+ "bpm" => TokenKind::Tempo,
29
+ "loop" => TokenKind::Loop,
30
+ "synth" => TokenKind::Synth,
31
+ _ => TokenKind::Identifier,
32
+ };
33
+
34
+ tokens.push(Token {
35
+ kind: kind.clone(),
36
+ lexeme: ident,
37
+ line: *line,
38
+ column: *column,
39
+ indent: *current_indent,
40
+ });
41
+ }
@@ -0,0 +1,52 @@
1
+ use crate::core::lexer::token::{ Token, TokenKind };
2
+
3
+ pub fn handle_indent_lexer(
4
+ chars: &mut std::iter::Peekable<std::str::Chars>,
5
+ current_indent: &mut usize,
6
+ indent_stack: &mut Vec<usize>,
7
+ tokens: &mut Vec<Token>,
8
+ line: &mut usize,
9
+ column: &mut usize
10
+ ) {
11
+ *current_indent = 0;
12
+ let mut col = *column;
13
+
14
+ while let Some(&c) = chars.peek() {
15
+ if c == ' ' {
16
+ *current_indent += 1;
17
+ chars.next();
18
+ col += 1;
19
+ } else if c == '\t' {
20
+ *current_indent += 4;
21
+ chars.next();
22
+ col += 4;
23
+ } else {
24
+ break;
25
+ }
26
+ }
27
+
28
+ *column = col;
29
+
30
+ let last_indent = *indent_stack.last().unwrap();
31
+ if *current_indent > last_indent {
32
+ indent_stack.push(*current_indent);
33
+ tokens.push(Token {
34
+ kind: TokenKind::Indent,
35
+ lexeme: String::new(),
36
+ line: *line,
37
+ column: *column,
38
+ indent: *current_indent,
39
+ });
40
+ } else {
41
+ while *current_indent < *indent_stack.last().unwrap() {
42
+ indent_stack.pop();
43
+ tokens.push(Token {
44
+ kind: TokenKind::Dedent,
45
+ lexeme: String::new(),
46
+ line: *line,
47
+ column: *column,
48
+ indent: *current_indent,
49
+ });
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,14 @@
1
+ pub mod driver;
2
+
3
+ pub mod at;
4
+ pub mod brace;
5
+ pub mod colon;
6
+ pub mod comment;
7
+ pub mod dot;
8
+ pub mod operator;
9
+ pub mod identifier;
10
+ pub mod newline;
11
+ pub mod number;
12
+ pub mod indent;
13
+ pub mod string;
14
+ pub mod arrow;
@@ -0,0 +1,23 @@
1
+ use crate::core::lexer::token::{ Token, TokenKind };
2
+
3
+ pub fn handle_newline_lexer(
4
+ ch: char,
5
+ chars: &mut std::iter::Peekable<std::str::Chars>,
6
+ tokens: &mut Vec<Token>,
7
+ line: &mut usize,
8
+ column: &mut usize,
9
+ at_line_start: &mut bool,
10
+ current_indent: &mut usize
11
+ ) {
12
+ tokens.push(Token {
13
+ kind: TokenKind::Newline,
14
+ lexeme: ch.to_string(),
15
+ line: *line,
16
+ column: 0,
17
+ indent: *current_indent,
18
+ });
19
+
20
+ *line += 1;
21
+ *column = 1;
22
+ *at_line_start = true;
23
+ }
@@ -0,0 +1,31 @@
1
+ use crate::core::lexer::token::{ Token, TokenKind };
2
+
3
+ pub fn handle_number_lexer(
4
+ char: char,
5
+ chars: &mut std::iter::Peekable<std::str::Chars>,
6
+ current_indent: &mut usize,
7
+ indent_stack: &mut Vec<usize>,
8
+ tokens: &mut Vec<Token>,
9
+ line: &mut usize,
10
+ column: &mut usize
11
+ ) {
12
+ let mut number = char.to_string();
13
+
14
+ while let Some(&c) = chars.peek() {
15
+ if c.is_ascii_digit() {
16
+ number.push(c);
17
+ chars.next();
18
+ *column += 1;
19
+ } else {
20
+ break;
21
+ }
22
+ }
23
+
24
+ tokens.push(Token {
25
+ kind: TokenKind::Number,
26
+ lexeme: number,
27
+ line: *line,
28
+ column: *column,
29
+ indent: *current_indent,
30
+ });
31
+ }
@@ -0,0 +1,44 @@
1
+ use crate::core::lexer::token::{ Token, TokenKind };
2
+
3
+ pub fn handle_operator_lexer(
4
+ ch: char,
5
+ chars: &mut std::iter::Peekable<std::str::Chars>,
6
+ current_indent: &mut usize,
7
+ indent_stack: &mut Vec<usize>,
8
+ tokens: &mut Vec<Token>,
9
+ line: &mut usize,
10
+ column: &mut usize
11
+ ) {
12
+ let next = chars.peek().copied();
13
+
14
+ let (kind, len) = match (ch, next) {
15
+ ('=', Some('=')) => (TokenKind::DoubleEquals, 2),
16
+ ('!', Some('=')) => (TokenKind::NotEquals, 2),
17
+ ('>', Some('=')) => (TokenKind::GreaterEqual, 2),
18
+ ('<', Some('=')) => (TokenKind::LessEqual, 2),
19
+ ('=', _) => (TokenKind::Equals, 1),
20
+ ('>', _) => (TokenKind::Greater, 1),
21
+ ('<', _) => (TokenKind::Less, 1),
22
+ _ => {
23
+ return;
24
+ }
25
+ };
26
+
27
+ if len == 2 {
28
+ chars.next(); // consume second char
29
+ }
30
+
31
+ tokens.push(Token {
32
+ kind,
33
+ lexeme: if len == 2 {
34
+ format!("{}{}", ch, next.unwrap())
35
+ } else {
36
+ ch.to_string()
37
+ },
38
+ line: *line,
39
+ column: *column,
40
+ indent: *current_indent,
41
+ });
42
+
43
+ *column += len;
44
+ }
@@ -0,0 +1,63 @@
1
+ use crate::core::lexer::token::{ Token, TokenKind };
2
+
3
+ pub fn handle_string_lexer(
4
+ ch: char,
5
+ chars: &mut std::iter::Peekable<std::str::Chars>,
6
+ current_indent: &mut usize,
7
+ indent_stack: &mut Vec<usize>,
8
+ tokens: &mut Vec<Token>,
9
+ line: &mut usize,
10
+ column: &mut usize
11
+ ) {
12
+ let quote_char = ch;
13
+
14
+ let start_column = *column;
15
+ let start_line = *line;
16
+
17
+ *column += 1;
18
+
19
+ let mut string_content = String::new();
20
+
21
+ while let Some(&next_ch) = chars.peek() {
22
+ if next_ch == quote_char {
23
+ chars.next();
24
+ *column += 1;
25
+ break;
26
+ } else if next_ch == '\\' {
27
+ chars.next();
28
+ *column += 1;
29
+
30
+ if let Some(escaped) = chars.next() {
31
+ match escaped {
32
+ 'n' => string_content.push('\n'),
33
+ 't' => string_content.push('\t'),
34
+ '\\' => string_content.push('\\'),
35
+ '"' => string_content.push('"'),
36
+ '\'' => string_content.push('\''),
37
+ other => {
38
+ string_content.push('\\');
39
+ string_content.push(other);
40
+ }
41
+ }
42
+ *column += 1;
43
+ }
44
+ } else {
45
+ chars.next();
46
+ if next_ch == '\n' {
47
+ *line += 1;
48
+ *column = 1;
49
+ } else {
50
+ *column += 1;
51
+ }
52
+ string_content.push(next_ch);
53
+ }
54
+ }
55
+
56
+ tokens.push(Token {
57
+ kind: TokenKind::String,
58
+ lexeme: string_content,
59
+ indent: *current_indent,
60
+ line: start_line,
61
+ column: start_column,
62
+ });
63
+ }