diff options
author | 2021-05-12 13:00:25 -0700 | |
---|---|---|
committer | 2021-05-12 13:00:25 -0700 | |
commit | c09d7cf83905111ef7af9ee5bbd523f56664395c (patch) | |
tree | 84fed91f8f6522594b109c09140f69d9c39ff598 /src/js_lexer.zig | |
parent | f8131f42bcd039964586cbf3bd019dc9a449c438 (diff) | |
download | bun-c09d7cf83905111ef7af9ee5bbd523f56664395c.tar.gz bun-c09d7cf83905111ef7af9ee5bbd523f56664395c.tar.zst bun-c09d7cf83905111ef7af9ee5bbd523f56664395c.zip |
That's all the errors??
Former-commit-id: f9a74df73d2831bfdd8e6f1c0e5c999ea300fc0d
Diffstat (limited to 'src/js_lexer.zig')
-rw-r--r-- | src/js_lexer.zig | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/js_lexer.zig b/src/js_lexer.zig index 4c758c6a4..e90886ead 100644 --- a/src/js_lexer.zig +++ b/src/js_lexer.zig @@ -52,7 +52,7 @@ pub const Lexer = struct { log: *logger.Log, json_options: ?JSONOptions = null, for_global_name: bool = false, - source: *logger.Source, + source: *const logger.Source, current: usize = 0, start: usize = 0, end: usize = 0, @@ -1094,11 +1094,11 @@ pub const Lexer = struct { }; } - pub fn initGlobalName(log: *logger.Log, source: *logger.Source, allocator: *std.mem.Allocator) !LexerType { - var empty_string_literal: JavascriptString = emptyJavaScriptString; + pub fn initGlobalName(log: *logger.Log, source: *const logger.Source, allocator: *std.mem.Allocator) !LexerType { + var empty_string_literal: JavascriptString = &emptyJavaScriptString; var lex = LexerType{ .log = log, - .source = source.*, + .source = source, .string_literal_is_ascii = true, .string_literal = empty_string_literal, .string_literal_buffer = std.ArrayList(u16).init(allocator), @@ -1113,11 +1113,11 @@ pub const Lexer = struct { return lex; } - pub fn initTSConfig(log: *logger.Log, source: *logger.Source, allocator: *std.mem.Allocator) !LexerType { - var empty_string_literal: JavascriptString = emptyJavaScriptString; + pub fn initTSConfig(log: *logger.Log, source: *const logger.Source, allocator: *std.mem.Allocator) !LexerType { + var empty_string_literal: JavascriptString = &emptyJavaScriptString; var lex = LexerType{ .log = log, - .source = source.*, + .source = source, .string_literal = empty_string_literal, .string_literal_buffer = std.ArrayList(u16).init(allocator), .prev_error_loc = logger.Loc.Empty, @@ -1135,7 +1135,7 @@ pub const Lexer = struct { return lex; } - pub fn initJSON(log: *logger.Log, source: *logger.Source, allocator: *std.mem.Allocator) !LexerType { + pub fn initJSON(log: *logger.Log, source: *const logger.Source, allocator: *std.mem.Allocator) !LexerType { var empty_string_literal: JavascriptString = &emptyJavaScriptString; var lex = LexerType{ .log = log, |