We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b5b28a0 commit 6d47aa3Copy full SHA for 6d47aa3
1 file changed
src/calculator/mod.rs
@@ -167,6 +167,10 @@ impl Calc {
167
let mut iter = chars.enumerate().peekable();
168
while let Some((idx, c)) = iter.next() {
169
log::trace!("Character in tokenisation is: {c}");
170
+ if c == '_' {
171
+ continue;
172
+ }
173
+
174
if c.is_digit(BASE) || c == '.' {
175
log::trace!("Character was num: {c}");
176
number_buf.push(c);
@@ -177,6 +181,9 @@ impl Calc {
177
181
log::trace!("Next character ({}) was a num or .", next.1);
178
182
number_buf.push(next.1)
179
183
}
184
+ Some((_, '_')) => {
185
+ // do nothing
186
180
187
// No number next
188
_ => {
189
log::trace!("Got to num next with: {c}");
0 commit comments