Skip to content

Commit 5e5ec9c

Browse files
committed
refactor(parser): pass file content from lexer
1 parent 44a1524 commit 5e5ec9c

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/parser/parser.odin

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ parse_file :: proc(p: ^Parser, fullpath: string) -> ^ast.File {
3030
p.file = ast.new(ast.File, first_token.pos, last_token.pos, p.alloc)
3131
p.file.alloc = p.alloc
3232
p.file.fullpath = fullpath
33-
src, _ := os.read_entire_file(fullpath, p.alloc)
34-
p.file.src = cast(string)src // TODO: pass file src from lexer
33+
p.file.src = l.src
3534
p.file.tags = parse_file_tags(p)
3635
p.file.pkg = parse_package(p)
3736
p.file.decls = parse_top_level_stmt_list(p)

0 commit comments

Comments
 (0)