summaryrefslogtreecommitdiff
path: root/src/parse/lines.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-07-30 18:04:08 +0200
committerLaurenz <laurmaedje@gmail.com>2021-07-30 18:49:19 +0200
commit1ee1d078e2480ddd08d40915bc7a74a8352acff0 (patch)
tree1e7ff367278a19fead3e404cf06d65bfb80a6cd9 /src/parse/lines.rs
parent42a27b48df427edf8dbb624c51551a90ecf2e7ea (diff)
Fatal errors
- Makes errors fatal, so that a phase is only reached when all previous phases were error-free - Parsing still recovers and can produce multiple errors - Evaluation fails fast and can thus produce only a single error (except for parse errors due to an import) - The single error that could occur during execution is removed for now - Removes Value::Error variant
Diffstat (limited to 'src/parse/lines.rs')
-rw-r--r--src/parse/lines.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parse/lines.rs b/src/parse/lines.rs
index e42d110b..2d97a25c 100644
--- a/src/parse/lines.rs
+++ b/src/parse/lines.rs
@@ -77,8 +77,8 @@ impl<'s> LineMap<'s> {
}
}
-/// Determine the column at the end of the string.
-pub fn search_column(src: &str) -> usize {
+/// Count how many column the string would fill.
+pub fn count_columns(src: &str) -> usize {
let mut column = 0;
for c in src.chars().rev() {
if is_newline(c) {