Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Feb 17, 2024
1 parent 362dbcb commit 5db92fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions garando_errors/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ pub trait CodeMapper {
fn lookup_char_pos(&self, pos: BytePos) -> Loc;
fn span_to_lines(&self, sp: Span) -> FileLinesResult;
fn span_to_filename(&self, sp: Span) -> FileName;
fn span_to_string(&self, sp: Span) -> String;
fn merge_spans(&self, sp_lhs: Span, sp_rhs: Span) -> Option<Span>;
}

impl CodeSuggestion {
Expand Down
8 changes: 7 additions & 1 deletion garando_syntax/src/codemap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ use std::cell::{Ref, RefCell};
use std::path::Path;
use std::rc::Rc;

use crate::errors::CodeMapper;
use std::fs;
use std::io::{self, Read};

use garando_errors::CodeMapper;
use log::debug;
use serde::{Deserialize, Serialize};

Expand Down Expand Up @@ -493,6 +493,12 @@ impl CodeMapper for CodeMap {
fn span_to_filename(&self, sp: Span) -> FileName {
self.span_to_filename(sp)
}
fn span_to_string(&self, sp: Span) -> String {
self.span_to_snippet(sp).unwrap()
}
fn merge_spans(&self, sp_lhs: Span, sp_rhs: Span) -> Option<Span> {
todo!()
}
}

#[derive(Clone)]
Expand Down

0 comments on commit 5db92fc

Please sign in to comment.