lang: use std.mem.startsWith
This commit is contained in:
parent
b0ddb35ae9
commit
b66070c4e4
2 changed files with 2 additions and 4 deletions
|
@ -332,7 +332,7 @@ pub const Lang = struct {
|
|||
stmt = std.mem.trimLeft(u8, stmt, "\n");
|
||||
|
||||
if (stmt.len == 0) continue;
|
||||
if (stmt[0] == '#') continue;
|
||||
if (std.mem.startsWith(u8, stmt, "#")) continue;
|
||||
|
||||
// TODO better tokenizer instead of just tokenize(" ");
|
||||
var tok_it = std.mem.tokenize(stmt, " ");
|
||||
|
|
|
@ -21,9 +21,7 @@ pub fn main() !void {
|
|||
|
||||
var args_it = std.process.args();
|
||||
|
||||
const exe_name = try (args_it.next(allocator) orelse @panic("expected exe name"));
|
||||
|
||||
// args[1] is the path to scri file
|
||||
_ = try (args_it.next(allocator) orelse @panic("expected exe name"));
|
||||
const scri_path = try (args_it.next(allocator) orelse @panic("expected scri path"));
|
||||
|
||||
var file = try std.fs.File.openRead(scri_path);
|
||||
|
|
Loading…
Reference in a new issue