mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
fmt
This commit is contained in:
parent
810c7dce80
commit
4828c9ba62
19 changed files with 177 additions and 143 deletions
|
@ -137,7 +137,12 @@ fn run_event_loop(project_dir_path_opt: Option<&Path>) -> Result<(), Box<dyn Err
|
|||
let dep_idents = IdentIds::exposed_builtins(8);
|
||||
let exposed_ident_ids = IdentIds::default();
|
||||
let module_ids = loaded_module.interns.module_ids.clone();
|
||||
let all_ident_ids = loaded_module.interns.all_ident_ids.get(&loaded_module.module_id).unwrap().clone(); //TODO remove unwrap
|
||||
let all_ident_ids = loaded_module
|
||||
.interns
|
||||
.all_ident_ids
|
||||
.get(&loaded_module.module_id)
|
||||
.unwrap()
|
||||
.clone(); //TODO remove unwrap
|
||||
|
||||
let env = Env::new(
|
||||
loaded_module.module_id,
|
||||
|
|
|
@ -242,8 +242,13 @@ pub mod test_ed_model {
|
|||
&mut ed_model_refs.var_store,
|
||||
dep_idents,
|
||||
module_ids,
|
||||
loaded_module.interns.all_ident_ids.get(&loaded_module.module_id).unwrap().clone(),
|
||||
exposed_ident_ids
|
||||
loaded_module
|
||||
.interns
|
||||
.all_ident_ids
|
||||
.get(&loaded_module.module_id)
|
||||
.unwrap()
|
||||
.clone(),
|
||||
exposed_ident_ids,
|
||||
);
|
||||
|
||||
ed_model::init_model(
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
use roc_ast::{
|
||||
lang::{
|
||||
core::{
|
||||
ast::ASTNodeId,
|
||||
def::def2::Def2,
|
||||
expr::expr2::Expr2,
|
||||
},
|
||||
env::Env,
|
||||
},
|
||||
use roc_ast::lang::{
|
||||
core::{ast::ASTNodeId, def::def2::Def2, expr::expr2::Expr2},
|
||||
env::Env,
|
||||
};
|
||||
use roc_code_markup::{
|
||||
markup::{
|
||||
|
@ -17,7 +11,7 @@ use roc_code_markup::{
|
|||
slow_pool::{MarkNodeId, SlowPool},
|
||||
syntax_highlight::HighlightStyle,
|
||||
};
|
||||
use roc_module::symbol::{IdentId};
|
||||
use roc_module::symbol::IdentId;
|
||||
|
||||
use crate::{
|
||||
editor::ed_error::{EdResult, FailedToUpdateIdentIdName, KeyNotFound},
|
||||
|
@ -37,7 +31,7 @@ pub fn tld_mark_node<'a>(
|
|||
expr_mark_node_id: MarkNodeId,
|
||||
ast_node_id: ASTNodeId,
|
||||
mark_node_pool: &mut SlowPool,
|
||||
env: &Env<'a>
|
||||
env: &Env<'a>,
|
||||
) -> EdResult<MarkupNode> {
|
||||
let val_name = env.get_name_for_ident_id(identifier_id)?;
|
||||
|
||||
|
@ -108,7 +102,7 @@ pub fn start_new_tld_value(ed_model: &mut EdModel, new_char: &char) -> EdResult<
|
|||
val_expr_mn_id,
|
||||
ast_node_id,
|
||||
&mut ed_model.mark_node_pool,
|
||||
&ed_model.module.env
|
||||
&ed_model.module.env,
|
||||
)?;
|
||||
|
||||
let new_ast_node = Def2::ValueDef {
|
||||
|
|
|
@ -3,7 +3,7 @@ use crate::editor::{ed_error::EdResult, theme::EdTheme, util::map_get};
|
|||
use crate::graphics::primitives::rect::Rect;
|
||||
use crate::graphics::primitives::text as gr_text;
|
||||
use cgmath::Vector2;
|
||||
use roc_code_markup::markup::nodes::{BLANK_PLACEHOLDER, MarkupNode, SINGLE_INDENT};
|
||||
use roc_code_markup::markup::nodes::{MarkupNode, BLANK_PLACEHOLDER, SINGLE_INDENT};
|
||||
use roc_code_markup::slow_pool::{MarkNodeId, SlowPool};
|
||||
use roc_code_markup::syntax_highlight::HighlightStyle;
|
||||
use winit::dpi::PhysicalSize;
|
||||
|
@ -157,7 +157,8 @@ fn markup_to_wgpu_helper<'a>(
|
|||
.with_color(colors::to_slice(colors::WHITE))
|
||||
.with_scale(code_style.font_size);
|
||||
|
||||
let highlight_color = map_get(&code_style.ed_theme.syntax_high_map, &HighlightStyle::Blank)?;
|
||||
let highlight_color =
|
||||
map_get(&code_style.ed_theme.syntax_high_map, &HighlightStyle::Blank)?;
|
||||
|
||||
let char_width = code_style.glyph_dim_rect.width;
|
||||
let char_height = code_style.glyph_dim_rect.height;
|
||||
|
@ -193,7 +194,7 @@ fn markup_to_wgpu_helper<'a>(
|
|||
.with_color(colors::to_slice(colors::WHITE))
|
||||
.with_scale(code_style.font_size);
|
||||
|
||||
wgpu_texts.push(glyph_text);
|
||||
wgpu_texts.push(glyph_text);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue