Skip to content

Commit bff5b8d

Browse files
committed
Revert "update"
This reverts commit 2f79eae.
1 parent 2f79eae commit bff5b8d

File tree

18 files changed

+17
-249
lines changed

18 files changed

+17
-249
lines changed

cmd/src/main.ri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ func main() {
5454
},
5555
else -> utils.error("unknown command `{}`", cmd)
5656
}
57-
}
57+
}

cmd/src/tools/cmd_new.ri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,4 +235,4 @@ func create_git_repo(dir: string) -> ! {
235235
utils.info("creating `.gitignore` file...");
236236
fs.write_file(gitignore_path, templates.gitignoreFile.fmt(dir))!;
237237
}
238-
}
238+
}

lib/core/src/StringBuilder.c.ri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,4 @@ public struct StringBuilder < Stringable {
185185
).clone()
186186
};
187187
}
188-
}
188+
}

lib/rivet/src/ast/CHeader.ri

Lines changed: 0 additions & 192 deletions
This file was deleted.

lib/rivet/src/ast/Decl.ri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,4 +235,4 @@ public func filter_field_decl(decls: []Decl) -> []Decl {
235235
}
236236
}
237237
return fields;
238-
}
238+
}

lib/rivet/src/ast/Stmt.ri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ public enum Stmt {
5555
.Defer as defer_stmt -> defer_stmt.pos
5656
};
5757
}
58-
}
58+
}

lib/rivet/src/ast/Table.ri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,4 +573,4 @@ enum BuiltinFuncCheck {
573573
arg_idx: uint;
574574
type: BuiltinFuncType;
575575
}
576-
}
576+
}

lib/rivet/src/ast/mod.ri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,4 @@ public struct ObjectData {
7979
public mut sym: Var;
8080
public is_extern: bool;
8181
public is_global: bool;
82-
}
82+
}

lib/rivet/src/parser/decls.ri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,4 +657,4 @@ extend Parser {
657657
self_pos: self_pos
658658
);
659659
}
660-
}
660+
}

lib/rivet/src/parser/mod.ri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,4 +186,4 @@ public struct Parser {
186186
}
187187
return comments;
188188
}
189-
}
189+
}

lib/rivet/src/parser/stmts.ri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,4 @@ extend Parser {
142142
}
143143
};
144144
}
145-
}
145+
}

lib/rivet/src/prefs/mod.ri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,4 +323,4 @@ public struct Prefs {
323323
};
324324
self.library_path.push(self.mod_dir);
325325
}
326-
}
326+
}

lib/rivet/src/resolver/decls.ri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,4 +223,4 @@ extend Resolver {
223223
self.self_sym_is_set = old_self_sym_is_set;
224224
}
225225
}
226-
}
226+
}

lib/rivet/src/resolver/stmts.ri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ extend Resolver {
7373
.Defer as defer_stmt -> self.resolve_expr(defer_stmt.expr)
7474
}
7575
}
76-
}
76+
}

lib/rivet/src/token/Kind.ri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,4 +295,4 @@ public func overloadable_operator_name(kind: Kind) -> string {
295295
.Ge -> "_ge_",
296296
else -> "_unknown_operator_"
297297
};
298-
}
298+
}

lib/rivet/src/tokenizer/mod.ri

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -279,36 +279,6 @@ public struct Tokenizer {
279279
}
280280
}
281281

282-
// NOTE: this function doesn't do any decoding... it just replaces '\xc0' with
283-
// the byte 0xc0
284-
func decode_h_escape_single(str: string, idx: uint) -> (uint, string) {
285-
end_idx := idx + 4; // "\xXX".len == 4
286-
return (
287-
end_idx,
288-
@as(uint8, conv.parse_uint(str[idx + 2..end_idx], 16, 8) catch 0).to_string()
289-
);
290-
}
291-
292-
// only handle single-byte inline escapes like '\xc0'
293-
func decode_h_escapes(s: string, start: uint, escapes_pos: []uint) -> string {
294-
if escapes_pos.is_empty() {
295-
return s;
296-
}
297-
mut ss := @vec(string, escapes_pos.len * 2 + 1);
298-
ss.push(s[..escapes_pos[escapes_pos.len - 1] - start]);
299-
for i, pos in escapes_pos {
300-
idx := pos - start;
301-
(end_idx, segment) := decode_h_escape_single(s, idx);
302-
ss.push(segment);
303-
ss.push(if i + 1 < escapes_pos.len {
304-
s[end_idx..escapes_pos[i + 1] - start]
305-
} else {
306-
s[end_idx..]
307-
});
308-
}
309-
return utils.join(ss, "");
310-
}
311-
312282
// handle single-byte inline octal escapes like '\###'
313283
// NOTE: this function doesn't do any decoding... it just replaces '\141' with
314284
// the byte 0o141
@@ -358,16 +328,6 @@ func decode_u_escapes(str: string, start: uint, escapes_pos: []uint) -> string {
358328
});
359329
}
360330
return utils.join(ss, "");
361-
func decode_unicode_escaped_rune(str: string) -> string {
362-
(end_idx, segment) := decode_u_escape_single(str, 0);
363-
return if str.len == end_idx {
364-
segment
365-
} else {
366-
mut ss := @vec(string, 2);
367-
ss.push(segment);
368-
ss.push(str[end_idx..]);
369-
utils.join(ss, "")
370-
};
371331
}
372332

373333
func trim_slash_line_break(s: string) -> string {
@@ -392,4 +352,4 @@ func number_literal_without_separator(lit: string) -> string {
392352
} else {
393353
lit
394354
};
395-
}
355+
}

lib/rivet/src/tokenizer/next.ri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,4 +781,4 @@ extend Tokenizer {
781781

782782
return lit;
783783
}
784-
}
784+
}

lib/rivet/src/utils/mod.ri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,4 @@ public func round_up(n: uint, multiple: uint) -> uint {
107107
n_ := @as(int, n);
108108
multiple_ := @as(int, multiple);
109109
return @as(uint, (n_ + multiple_ - 1) & (-multiple_));
110-
}
110+
}

0 commit comments

Comments
 (0)