mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
clippy fixes, fmt
This commit is contained in:
parent
4c2de0215a
commit
95a30210ce
44 changed files with 100 additions and 98 deletions
|
@ -18,7 +18,7 @@ use crate::{
|
||||||
env::Env,
|
env::Env,
|
||||||
scope::Scope,
|
scope::Scope,
|
||||||
},
|
},
|
||||||
pool::{pool_str::PoolStr, pool_vec::PoolVec, shallow_clone::ShallowClone},
|
mem_pool::{pool_str::PoolStr, pool_vec::PoolVec, shallow_clone::ShallowClone},
|
||||||
};
|
};
|
||||||
|
|
||||||
pub(crate) enum CanonicalizeRecordProblem {
|
pub(crate) enum CanonicalizeRecordProblem {
|
||||||
|
@ -275,7 +275,7 @@ pub(crate) fn canonicalize_lookup(
|
||||||
Var(symbol)
|
Var(symbol)
|
||||||
}
|
}
|
||||||
Err(problem) => {
|
Err(problem) => {
|
||||||
env.problem(Problem::RuntimeError(problem.clone()));
|
env.problem(Problem::RuntimeError(problem));
|
||||||
|
|
||||||
RuntimeError()
|
RuntimeError()
|
||||||
}
|
}
|
||||||
|
@ -292,7 +292,7 @@ pub(crate) fn canonicalize_lookup(
|
||||||
Err(problem) => {
|
Err(problem) => {
|
||||||
// Either the module wasn't imported, or
|
// Either the module wasn't imported, or
|
||||||
// it was imported but it doesn't expose this ident.
|
// it was imported but it doesn't expose this ident.
|
||||||
env.problem(Problem::RuntimeError(problem.clone()));
|
env.problem(Problem::RuntimeError(problem));
|
||||||
|
|
||||||
RuntimeError()
|
RuntimeError()
|
||||||
}
|
}
|
|
@ -24,10 +24,10 @@ use crate::lang::core::types::Alias;
|
||||||
use crate::lang::core::val_def::ValueDef;
|
use crate::lang::core::val_def::ValueDef;
|
||||||
use crate::lang::env::Env;
|
use crate::lang::env::Env;
|
||||||
use crate::lang::scope::Scope;
|
use crate::lang::scope::Scope;
|
||||||
use crate::pool::pool::NodeId;
|
use crate::mem_pool::pool::NodeId;
|
||||||
use crate::pool::pool::Pool;
|
use crate::mem_pool::pool::Pool;
|
||||||
use crate::pool::pool_vec::PoolVec;
|
use crate::mem_pool::pool_vec::PoolVec;
|
||||||
use crate::pool::shallow_clone::ShallowClone;
|
use crate::mem_pool::shallow_clone::ShallowClone;
|
||||||
|
|
||||||
pub struct ModuleOutput {
|
pub struct ModuleOutput {
|
||||||
pub aliases: MutMap<Symbol, NodeId<Alias>>,
|
pub aliases: MutMap<Symbol, NodeId<Alias>>,
|
|
@ -26,7 +26,7 @@ use crate::{
|
||||||
},
|
},
|
||||||
env::Env,
|
env::Env,
|
||||||
},
|
},
|
||||||
pool::{pool::Pool, pool_str::PoolStr, pool_vec::PoolVec, shallow_clone::ShallowClone},
|
mem_pool::{pool::Pool, pool_str::PoolStr, pool_vec::PoolVec, shallow_clone::ShallowClone},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
@ -1781,7 +1781,7 @@ pub mod test_constrain {
|
||||||
env::Env,
|
env::Env,
|
||||||
scope::Scope,
|
scope::Scope,
|
||||||
},
|
},
|
||||||
pool::pool::Pool,
|
mem_pool::pool::Pool,
|
||||||
solve_type,
|
solve_type,
|
||||||
};
|
};
|
||||||
use indoc::indoc;
|
use indoc::indoc;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
ast_error::{ASTNodeIdWithoutExprId, ASTResult},
|
ast_error::{ASTNodeIdWithoutExprId, ASTResult},
|
||||||
pool::pool::Pool,
|
mem_pool::pool::Pool,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
|
|
|
@ -2,7 +2,7 @@ use roc_types::subs::VarStore;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
lang::core::{def::def::Def, expr::expr2::Expr2},
|
lang::core::{def::def::Def, expr::expr2::Expr2},
|
||||||
pool::{pool::Pool, pool_vec::PoolVec},
|
mem_pool::{pool::Pool, pool_vec::PoolVec},
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::def::def::Declaration;
|
use super::def::def::Declaration;
|
||||||
|
|
|
@ -37,7 +37,7 @@ use crate::{
|
||||||
rigids::Rigids,
|
rigids::Rigids,
|
||||||
scope::Scope,
|
scope::Scope,
|
||||||
},
|
},
|
||||||
pool::{pool::Pool, pool_vec::PoolVec, shallow_clone::ShallowClone},
|
mem_pool::{pool::Pool, pool_vec::PoolVec, shallow_clone::ShallowClone},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
|
|
@ -3,7 +3,7 @@ use crate::{
|
||||||
expr::{expr2::Expr2, expr2_to_string::expr2_to_string},
|
expr::{expr2::Expr2, expr2_to_string::expr2_to_string},
|
||||||
pattern::Pattern2,
|
pattern::Pattern2,
|
||||||
},
|
},
|
||||||
pool::pool::{NodeId, Pool},
|
mem_pool::pool::{NodeId, Pool},
|
||||||
};
|
};
|
||||||
|
|
||||||
// A top level definition, not inside a function. For example: `main = "Hello, world!"`
|
// A top level definition, not inside a function. For example: `main = "Hello, world!"`
|
||||||
|
|
|
@ -3,7 +3,7 @@ use roc_types::subs::Variable;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
lang::core::{fun_def::FunctionDef, pattern::Pattern2, val_def::ValueDef},
|
lang::core::{fun_def::FunctionDef, pattern::Pattern2, val_def::ValueDef},
|
||||||
pool::{pool::NodeId, pool_str::PoolStr, pool_vec::PoolVec},
|
mem_pool::{pool::NodeId, pool_str::PoolStr, pool_vec::PoolVec},
|
||||||
};
|
};
|
||||||
use roc_can::expr::Recursive;
|
use roc_can::expr::Recursive;
|
||||||
use roc_module::low_level::LowLevel;
|
use roc_module::low_level::LowLevel;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
lang::core::{expr::record_field::RecordField, val_def::value_def_to_string},
|
lang::core::{expr::record_field::RecordField, val_def::value_def_to_string},
|
||||||
pool::pool::Pool,
|
mem_pool::pool::Pool,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::expr2::{Expr2, ExprId};
|
use super::expr2::{Expr2, ExprId};
|
||||||
|
|
|
@ -9,7 +9,7 @@ use roc_problem::can::{Problem, RuntimeError};
|
||||||
use roc_region::all::{Located, Region};
|
use roc_region::all::{Located, Region};
|
||||||
|
|
||||||
use super::{expr2::Expr2, output::Output};
|
use super::{expr2::Expr2, output::Output};
|
||||||
use crate::canonicalize::canonicalize::{
|
use crate::canonicalization::canonicalize::{
|
||||||
canonicalize_fields, canonicalize_lookup, canonicalize_when_branch, CanonicalizeRecordProblem,
|
canonicalize_fields, canonicalize_lookup, canonicalize_when_branch, CanonicalizeRecordProblem,
|
||||||
};
|
};
|
||||||
use crate::lang::core::declaration::decl_to_let;
|
use crate::lang::core::declaration::decl_to_let;
|
||||||
|
@ -17,14 +17,14 @@ use crate::lang::core::def::def::{canonicalize_defs, sort_can_defs};
|
||||||
use crate::lang::core::expr::expr2::ClosureExtra;
|
use crate::lang::core::expr::expr2::ClosureExtra;
|
||||||
use crate::lang::core::pattern::to_pattern2;
|
use crate::lang::core::pattern::to_pattern2;
|
||||||
use crate::lang::core::str::flatten_str_literal;
|
use crate::lang::core::str::flatten_str_literal;
|
||||||
use crate::pool::shallow_clone::ShallowClone;
|
use crate::mem_pool::shallow_clone::ShallowClone;
|
||||||
use crate::{
|
use crate::{
|
||||||
lang::{
|
lang::{
|
||||||
core::expr::expr2::{ExprId, FloatVal, IntStyle, IntVal},
|
core::expr::expr2::{ExprId, FloatVal, IntStyle, IntVal},
|
||||||
env::Env,
|
env::Env,
|
||||||
scope::Scope,
|
scope::Scope,
|
||||||
},
|
},
|
||||||
pool::{pool_str::PoolStr, pool_vec::PoolVec},
|
mem_pool::{pool_str::PoolStr, pool_vec::PoolVec},
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn loc_expr_to_expr2<'a>(
|
pub fn loc_expr_to_expr2<'a>(
|
||||||
|
@ -65,7 +65,7 @@ pub fn to_expr2<'a>(
|
||||||
// emit runtime error
|
// emit runtime error
|
||||||
let runtime_error = RuntimeError::InvalidFloat(error, ZERO, raw.into());
|
let runtime_error = RuntimeError::InvalidFloat(error, ZERO, raw.into());
|
||||||
|
|
||||||
env.problem(Problem::RuntimeError(runtime_error.clone()));
|
env.problem(Problem::RuntimeError(runtime_error));
|
||||||
//
|
//
|
||||||
// Expr::RuntimeError(runtime_error)
|
// Expr::RuntimeError(runtime_error)
|
||||||
todo!()
|
todo!()
|
||||||
|
@ -94,7 +94,7 @@ pub fn to_expr2<'a>(
|
||||||
raw.into(),
|
raw.into(),
|
||||||
);
|
);
|
||||||
|
|
||||||
env.problem(Problem::RuntimeError(runtime_error.clone()));
|
env.problem(Problem::RuntimeError(runtime_error));
|
||||||
//
|
//
|
||||||
// Expr::RuntimeError(runtime_error)
|
// Expr::RuntimeError(runtime_error)
|
||||||
todo!()
|
todo!()
|
||||||
|
@ -122,7 +122,7 @@ pub fn to_expr2<'a>(
|
||||||
// emit runtime error
|
// emit runtime error
|
||||||
let runtime_error = RuntimeError::InvalidInt(error, *base, ZERO, raw.into());
|
let runtime_error = RuntimeError::InvalidInt(error, *base, ZERO, raw.into());
|
||||||
|
|
||||||
env.problem(Problem::RuntimeError(runtime_error.clone()));
|
env.problem(Problem::RuntimeError(runtime_error));
|
||||||
//
|
//
|
||||||
// Expr::RuntimeError(runtime_error)
|
// Expr::RuntimeError(runtime_error)
|
||||||
todo!()
|
todo!()
|
||||||
|
@ -130,7 +130,7 @@ pub fn to_expr2<'a>(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Str(literal) => flatten_str_literal(env, scope, &literal),
|
Str(literal) => flatten_str_literal(env, scope, literal),
|
||||||
|
|
||||||
List { items, .. } => {
|
List { items, .. } => {
|
||||||
let mut output = Output::default();
|
let mut output = Output::default();
|
||||||
|
@ -585,7 +585,7 @@ pub fn to_expr2<'a>(
|
||||||
let (unsorted, mut scope, defs_output, symbols_introduced) = canonicalize_defs(
|
let (unsorted, mut scope, defs_output, symbols_introduced) = canonicalize_defs(
|
||||||
env,
|
env,
|
||||||
Output::default(),
|
Output::default(),
|
||||||
&scope,
|
scope,
|
||||||
loc_defs,
|
loc_defs,
|
||||||
PatternType::DefExpr,
|
PatternType::DefExpr,
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
lang::core::{def::def::References, types::Alias},
|
lang::core::{def::def::References, types::Alias},
|
||||||
pool::pool::NodeId,
|
mem_pool::pool::NodeId,
|
||||||
};
|
};
|
||||||
use roc_collections::all::{MutMap, MutSet};
|
use roc_collections::all::{MutMap, MutSet};
|
||||||
use roc_module::symbol::Symbol;
|
use roc_module::symbol::Symbol;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use roc_types::subs::Variable;
|
use roc_types::subs::Variable;
|
||||||
|
|
||||||
use crate::pool::pool_str::PoolStr;
|
use crate::mem_pool::pool_str::PoolStr;
|
||||||
use roc_module::symbol::Symbol;
|
use roc_module::symbol::Symbol;
|
||||||
|
|
||||||
use super::expr2::ExprId;
|
use super::expr2::ExprId;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
lang::rigids::Rigids,
|
lang::rigids::Rigids,
|
||||||
pool::{pool::NodeId, pool_vec::PoolVec, shallow_clone::ShallowClone},
|
mem_pool::{pool::NodeId, pool_vec::PoolVec, shallow_clone::ShallowClone},
|
||||||
};
|
};
|
||||||
use roc_module::symbol::Symbol;
|
use roc_module::symbol::Symbol;
|
||||||
use roc_types::subs::Variable;
|
use roc_types::subs::Variable;
|
||||||
|
|
|
@ -18,10 +18,10 @@ use crate::constrain::Constraint;
|
||||||
use crate::lang::core::expr::expr_to_expr2::to_expr_id;
|
use crate::lang::core::expr::expr_to_expr2::to_expr_id;
|
||||||
use crate::lang::env::Env;
|
use crate::lang::env::Env;
|
||||||
use crate::lang::scope::Scope;
|
use crate::lang::scope::Scope;
|
||||||
use crate::pool::pool::{NodeId, Pool};
|
use crate::mem_pool::pool::{NodeId, Pool};
|
||||||
use crate::pool::pool_str::PoolStr;
|
use crate::mem_pool::pool_str::PoolStr;
|
||||||
use crate::pool::pool_vec::PoolVec;
|
use crate::mem_pool::pool_vec::PoolVec;
|
||||||
use crate::pool::shallow_clone::ShallowClone;
|
use crate::mem_pool::shallow_clone::ShallowClone;
|
||||||
|
|
||||||
use super::expr::expr2::{ExprId, FloatVal, IntVal};
|
use super::expr::expr2::{ExprId, FloatVal, IntVal};
|
||||||
use super::expr::output::Output;
|
use super::expr::output::Output;
|
||||||
|
|
|
@ -4,7 +4,7 @@ use roc_parse::ast::StrLiteral;
|
||||||
use crate::{
|
use crate::{
|
||||||
ast_error::{ASTResult, UnexpectedASTNode},
|
ast_error::{ASTResult, UnexpectedASTNode},
|
||||||
lang::{core::expr::expr_to_expr2::to_expr2, env::Env, scope::Scope},
|
lang::{core::expr::expr_to_expr2::to_expr2, env::Env, scope::Scope},
|
||||||
pool::{pool::Pool, pool_str::PoolStr, pool_vec::PoolVec},
|
mem_pool::{pool::Pool, pool_str::PoolStr, pool_vec::PoolVec},
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::expr::{
|
use super::expr::{
|
||||||
|
@ -123,7 +123,7 @@ fn flatten_str_lines<'a>(
|
||||||
|
|
||||||
/// Resolve string interpolations by desugaring a sequence of StrSegments
|
/// Resolve string interpolations by desugaring a sequence of StrSegments
|
||||||
/// into nested calls to Str.concat
|
/// into nested calls to Str.concat
|
||||||
fn desugar_str_segments<'a>(env: &mut Env<'a>, segments: Vec<StrSegment>) -> Expr2 {
|
fn desugar_str_segments(env: &mut Env, segments: Vec<StrSegment>) -> Expr2 {
|
||||||
use StrSegment::*;
|
use StrSegment::*;
|
||||||
|
|
||||||
let pool = &mut env.pool;
|
let pool = &mut env.pool;
|
||||||
|
|
|
@ -11,10 +11,10 @@ use roc_types::{subs::Variable, types::ErrorType};
|
||||||
|
|
||||||
use crate::lang::env::Env;
|
use crate::lang::env::Env;
|
||||||
use crate::lang::scope::Scope;
|
use crate::lang::scope::Scope;
|
||||||
use crate::pool::pool::{NodeId, Pool};
|
use crate::mem_pool::pool::{NodeId, Pool};
|
||||||
use crate::pool::pool_str::PoolStr;
|
use crate::mem_pool::pool_str::PoolStr;
|
||||||
use crate::pool::pool_vec::PoolVec;
|
use crate::mem_pool::pool_vec::PoolVec;
|
||||||
use crate::pool::shallow_clone::ShallowClone;
|
use crate::mem_pool::shallow_clone::ShallowClone;
|
||||||
|
|
||||||
pub type TypeId = NodeId<Type2>;
|
pub type TypeId = NodeId<Type2>;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
lang::{core::expr::expr2_to_string::expr2_to_string, rigids::Rigids},
|
lang::{core::expr::expr2_to_string::expr2_to_string, rigids::Rigids},
|
||||||
pool::{
|
mem_pool::{
|
||||||
pool::{NodeId, Pool},
|
pool::{NodeId, Pool},
|
||||||
shallow_clone::ShallowClone,
|
shallow_clone::ShallowClone,
|
||||||
},
|
},
|
||||||
|
|
|
@ -6,7 +6,7 @@ use roc_problem::can::{Problem, RuntimeError};
|
||||||
use roc_region::all::{Located, Region};
|
use roc_region::all::{Located, Region};
|
||||||
use roc_types::subs::VarStore;
|
use roc_types::subs::VarStore;
|
||||||
|
|
||||||
use crate::pool::pool::{NodeId, Pool};
|
use crate::mem_pool::pool::{NodeId, Pool};
|
||||||
|
|
||||||
use super::core::def::def::References;
|
use super::core::def::def::References;
|
||||||
|
|
||||||
|
@ -147,7 +147,7 @@ impl<'a> Env<'a> {
|
||||||
Ok(symbol)
|
Ok(symbol)
|
||||||
}
|
}
|
||||||
None => Err(RuntimeError::ValueNotExposed {
|
None => Err(RuntimeError::ValueNotExposed {
|
||||||
module_name: ModuleName::from(module_name),
|
module_name,
|
||||||
ident,
|
ident,
|
||||||
region,
|
region,
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -3,7 +3,9 @@ use std::{
|
||||||
hash::BuildHasherDefault,
|
hash::BuildHasherDefault,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::pool::{pool::Pool, pool_str::PoolStr, pool_vec::PoolVec, shallow_clone::ShallowClone};
|
use crate::mem_pool::{
|
||||||
|
pool::Pool, pool_str::PoolStr, pool_vec::PoolVec, shallow_clone::ShallowClone,
|
||||||
|
};
|
||||||
use roc_collections::all::WyHash;
|
use roc_collections::all::WyHash;
|
||||||
use roc_types::subs::Variable;
|
use roc_types::subs::Variable;
|
||||||
|
|
||||||
|
@ -45,11 +47,7 @@ impl Rigids {
|
||||||
.names
|
.names
|
||||||
.iter(pool)
|
.iter(pool)
|
||||||
.filter_map(|(opt_pool_str, var)| {
|
.filter_map(|(opt_pool_str, var)| {
|
||||||
if let Some(pool_str) = opt_pool_str {
|
opt_pool_str.as_ref().map(|pool_str| (*pool_str, *var))
|
||||||
Some((*pool_str, *var))
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.collect::<Vec<(PoolStr, Variable)>>();
|
.collect::<Vec<(PoolStr, Variable)>>();
|
||||||
|
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
#![allow(unused_imports)]
|
#![allow(unused_imports)]
|
||||||
|
|
||||||
use crate::pool::pool::Pool;
|
use crate::mem_pool::pool::Pool;
|
||||||
use crate::pool::pool_str::PoolStr;
|
use crate::mem_pool::pool_str::PoolStr;
|
||||||
use crate::pool::pool_vec::PoolVec;
|
use crate::mem_pool::pool_vec::PoolVec;
|
||||||
use crate::pool::shallow_clone::ShallowClone;
|
use crate::mem_pool::shallow_clone::ShallowClone;
|
||||||
use roc_collections::all::{MutMap, MutSet};
|
use roc_collections::all::{MutMap, MutSet};
|
||||||
use roc_module::ident::{Ident, Lowercase};
|
use roc_module::ident::{Ident, Lowercase};
|
||||||
use roc_module::symbol::{IdentIds, ModuleId, Symbol};
|
use roc_module::symbol::{IdentIds, ModuleId, Symbol};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
pub mod ast_error;
|
pub mod ast_error;
|
||||||
mod canonicalize;
|
mod canonicalization;
|
||||||
pub mod constrain;
|
pub mod constrain;
|
||||||
pub mod lang;
|
pub mod lang;
|
||||||
|
pub mod mem_pool;
|
||||||
pub mod parse;
|
pub mod parse;
|
||||||
pub mod pool;
|
|
||||||
pub mod solve_type;
|
pub mod solve_type;
|
||||||
|
|
|
@ -19,9 +19,9 @@ use roc_unify::unify::Unified::*;
|
||||||
|
|
||||||
use crate::constrain::Constraint;
|
use crate::constrain::Constraint;
|
||||||
use crate::lang::core::types::Type2;
|
use crate::lang::core::types::Type2;
|
||||||
use crate::pool::pool::Pool;
|
use crate::mem_pool::pool::Pool;
|
||||||
use crate::pool::pool_vec::PoolVec;
|
use crate::mem_pool::pool_vec::PoolVec;
|
||||||
use crate::pool::shallow_clone::ShallowClone;
|
use crate::mem_pool::shallow_clone::ShallowClone;
|
||||||
|
|
||||||
// Type checking system adapted from Elm by Evan Czaplicki, BSD-3-Clause Licensed
|
// Type checking system adapted from Elm by Evan Czaplicki, BSD-3-Clause Licensed
|
||||||
// https://github.com/elm/compiler
|
// https://github.com/elm/compiler
|
||||||
|
|
|
@ -65,10 +65,6 @@ pub struct Attributes {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Attributes {
|
impl Attributes {
|
||||||
pub fn new() -> Attributes {
|
|
||||||
Attributes { all: Vec::new() }
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn add(&mut self, attr: Attribute) {
|
pub fn add(&mut self, attr: Attribute) {
|
||||||
self.all.push(attr);
|
self.all.push(attr);
|
||||||
}
|
}
|
||||||
|
@ -121,3 +117,9 @@ impl Attributes {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for Attributes {
|
||||||
|
fn default() -> Self {
|
||||||
|
Attributes { all: Vec::new() }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ pub fn new_equals_mn(ast_node_id: ASTNodeId, parent_id_opt: Option<MarkNodeId>)
|
||||||
content: nodes::EQUALS.to_owned(),
|
content: nodes::EQUALS.to_owned(),
|
||||||
ast_node_id,
|
ast_node_id,
|
||||||
syn_high_style: HighlightStyle::Operator,
|
syn_high_style: HighlightStyle::Operator,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
parent_id_opt,
|
parent_id_opt,
|
||||||
newlines_at_end: 0,
|
newlines_at_end: 0,
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ pub fn new_comma_mn(expr_id: ExprId, parent_id_opt: Option<MarkNodeId>) -> Marku
|
||||||
content: nodes::COMMA.to_owned(),
|
content: nodes::COMMA.to_owned(),
|
||||||
ast_node_id: ASTNodeId::AExprId(expr_id),
|
ast_node_id: ASTNodeId::AExprId(expr_id),
|
||||||
syn_high_style: HighlightStyle::Blank,
|
syn_high_style: HighlightStyle::Blank,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
parent_id_opt,
|
parent_id_opt,
|
||||||
newlines_at_end: 0,
|
newlines_at_end: 0,
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ pub fn new_blank_mn(ast_node_id: ASTNodeId, parent_id_opt: Option<MarkNodeId>) -
|
||||||
MarkupNode::Blank {
|
MarkupNode::Blank {
|
||||||
ast_node_id,
|
ast_node_id,
|
||||||
syn_high_style: HighlightStyle::Blank,
|
syn_high_style: HighlightStyle::Blank,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
parent_id_opt,
|
parent_id_opt,
|
||||||
newlines_at_end: 0,
|
newlines_at_end: 0,
|
||||||
}
|
}
|
||||||
|
@ -44,7 +44,7 @@ pub fn new_blank_mn_w_nls(
|
||||||
MarkupNode::Blank {
|
MarkupNode::Blank {
|
||||||
ast_node_id,
|
ast_node_id,
|
||||||
syn_high_style: HighlightStyle::Blank,
|
syn_high_style: HighlightStyle::Blank,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
parent_id_opt,
|
parent_id_opt,
|
||||||
newlines_at_end: nr_of_newlines,
|
newlines_at_end: nr_of_newlines,
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ pub fn new_colon_mn(expr_id: ExprId, parent_id_opt: Option<MarkNodeId>) -> Marku
|
||||||
content: nodes::COLON.to_owned(),
|
content: nodes::COLON.to_owned(),
|
||||||
ast_node_id: ASTNodeId::AExprId(expr_id),
|
ast_node_id: ASTNodeId::AExprId(expr_id),
|
||||||
syn_high_style: HighlightStyle::Operator,
|
syn_high_style: HighlightStyle::Operator,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
parent_id_opt,
|
parent_id_opt,
|
||||||
newlines_at_end: 0,
|
newlines_at_end: 0,
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ pub fn new_left_accolade_mn(expr_id: ExprId, parent_id_opt: Option<MarkNodeId>)
|
||||||
content: nodes::LEFT_ACCOLADE.to_owned(),
|
content: nodes::LEFT_ACCOLADE.to_owned(),
|
||||||
ast_node_id: ASTNodeId::AExprId(expr_id),
|
ast_node_id: ASTNodeId::AExprId(expr_id),
|
||||||
syn_high_style: HighlightStyle::Bracket,
|
syn_high_style: HighlightStyle::Bracket,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
parent_id_opt,
|
parent_id_opt,
|
||||||
newlines_at_end: 0,
|
newlines_at_end: 0,
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ pub fn new_right_accolade_mn(expr_id: ExprId, parent_id_opt: Option<MarkNodeId>)
|
||||||
content: nodes::RIGHT_ACCOLADE.to_owned(),
|
content: nodes::RIGHT_ACCOLADE.to_owned(),
|
||||||
ast_node_id: ASTNodeId::AExprId(expr_id),
|
ast_node_id: ASTNodeId::AExprId(expr_id),
|
||||||
syn_high_style: HighlightStyle::Bracket,
|
syn_high_style: HighlightStyle::Bracket,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
parent_id_opt,
|
parent_id_opt,
|
||||||
newlines_at_end: 0,
|
newlines_at_end: 0,
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ pub fn new_left_square_mn(expr_id: ExprId, parent_id_opt: Option<MarkNodeId>) ->
|
||||||
content: nodes::LEFT_SQUARE_BR.to_owned(),
|
content: nodes::LEFT_SQUARE_BR.to_owned(),
|
||||||
ast_node_id: ASTNodeId::AExprId(expr_id),
|
ast_node_id: ASTNodeId::AExprId(expr_id),
|
||||||
syn_high_style: HighlightStyle::Bracket,
|
syn_high_style: HighlightStyle::Bracket,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
parent_id_opt,
|
parent_id_opt,
|
||||||
newlines_at_end: 0,
|
newlines_at_end: 0,
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ pub fn new_right_square_mn(expr_id: ExprId, parent_id_opt: Option<MarkNodeId>) -
|
||||||
content: nodes::RIGHT_SQUARE_BR.to_owned(),
|
content: nodes::RIGHT_SQUARE_BR.to_owned(),
|
||||||
ast_node_id: ASTNodeId::AExprId(expr_id),
|
ast_node_id: ASTNodeId::AExprId(expr_id),
|
||||||
syn_high_style: HighlightStyle::Bracket,
|
syn_high_style: HighlightStyle::Bracket,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
parent_id_opt,
|
parent_id_opt,
|
||||||
newlines_at_end: 0,
|
newlines_at_end: 0,
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ use roc_ast::{
|
||||||
},
|
},
|
||||||
env::Env,
|
env::Env,
|
||||||
},
|
},
|
||||||
pool::pool_str::PoolStr,
|
mem_pool::pool_str::PoolStr,
|
||||||
};
|
};
|
||||||
use roc_module::symbol::Interns;
|
use roc_module::symbol::Interns;
|
||||||
use roc_utils::{index_of, slice_get};
|
use roc_utils::{index_of, slice_get};
|
||||||
|
@ -323,7 +323,7 @@ fn new_markup_node(
|
||||||
content: text,
|
content: text,
|
||||||
ast_node_id: node_id,
|
ast_node_id: node_id,
|
||||||
syn_high_style: highlight_style,
|
syn_high_style: highlight_style,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
parent_id_opt: None,
|
parent_id_opt: None,
|
||||||
newlines_at_end: 0,
|
newlines_at_end: 0,
|
||||||
};
|
};
|
||||||
|
@ -528,7 +528,7 @@ pub fn expr2_to_markup<'a, 'b>(
|
||||||
content: val_name,
|
content: val_name,
|
||||||
ast_node_id,
|
ast_node_id,
|
||||||
syn_high_style: HighlightStyle::Variable,
|
syn_high_style: HighlightStyle::Variable,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
parent_id_opt: None,
|
parent_id_opt: None,
|
||||||
newlines_at_end: 0,
|
newlines_at_end: 0,
|
||||||
};
|
};
|
||||||
|
@ -637,7 +637,7 @@ fn header_mn(content: String, expr_id: ExprId, mark_node_pool: &mut SlowPool) ->
|
||||||
content,
|
content,
|
||||||
ast_node_id: ASTNodeId::AExprId(expr_id),
|
ast_node_id: ASTNodeId::AExprId(expr_id),
|
||||||
syn_high_style: HighlightStyle::PackageRelated,
|
syn_high_style: HighlightStyle::PackageRelated,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
parent_id_opt: None,
|
parent_id_opt: None,
|
||||||
newlines_at_end: 0,
|
newlines_at_end: 0,
|
||||||
};
|
};
|
||||||
|
@ -655,7 +655,7 @@ fn header_val_mn(
|
||||||
content,
|
content,
|
||||||
ast_node_id: ASTNodeId::AExprId(expr_id),
|
ast_node_id: ASTNodeId::AExprId(expr_id),
|
||||||
syn_high_style: highlight_style,
|
syn_high_style: highlight_style,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
parent_id_opt: None,
|
parent_id_opt: None,
|
||||||
newlines_at_end: 0,
|
newlines_at_end: 0,
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,7 +31,7 @@ pub fn tld_mark_node<'a>(
|
||||||
content: val_name,
|
content: val_name,
|
||||||
ast_node_id,
|
ast_node_id,
|
||||||
syn_high_style: HighlightStyle::Variable,
|
syn_high_style: HighlightStyle::Variable,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
parent_id_opt: None,
|
parent_id_opt: None,
|
||||||
newlines_at_end: 0,
|
newlines_at_end: 0,
|
||||||
};
|
};
|
||||||
|
|
|
@ -10,10 +10,6 @@ pub struct SlowPool {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl SlowPool {
|
impl SlowPool {
|
||||||
pub fn new() -> SlowPool {
|
|
||||||
SlowPool { nodes: Vec::new() }
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn add(&mut self, node: MarkupNode) -> MarkNodeId {
|
pub fn add(&mut self, node: MarkupNode) -> MarkNodeId {
|
||||||
let id = self.nodes.len();
|
let id = self.nodes.len();
|
||||||
|
|
||||||
|
@ -73,3 +69,9 @@ impl fmt::Display for SlowPool {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for SlowPool {
|
||||||
|
fn default() -> Self {
|
||||||
|
SlowPool { nodes: Vec::new() }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@ use cgmath::Vector2;
|
||||||
use fs_extra::dir::{copy, ls, CopyOptions, DirEntryAttr, DirEntryValue};
|
use fs_extra::dir::{copy, ls, CopyOptions, DirEntryAttr, DirEntryValue};
|
||||||
use pipelines::RectResources;
|
use pipelines::RectResources;
|
||||||
use roc_ast::lang::env::Env;
|
use roc_ast::lang::env::Env;
|
||||||
use roc_ast::pool::pool::Pool;
|
use roc_ast::mem_pool::pool::Pool;
|
||||||
use roc_can::builtins::builtin_defs_map;
|
use roc_can::builtins::builtin_defs_map;
|
||||||
use roc_collections::all::MutMap;
|
use roc_collections::all::MutMap;
|
||||||
use roc_load;
|
use roc_load;
|
||||||
|
|
|
@ -13,8 +13,8 @@ use bumpalo::Bump;
|
||||||
use nonempty::NonEmpty;
|
use nonempty::NonEmpty;
|
||||||
use roc_ast::lang::core::ast::{ASTNodeId, AST};
|
use roc_ast::lang::core::ast::{ASTNodeId, AST};
|
||||||
use roc_ast::lang::env::Env;
|
use roc_ast::lang::env::Env;
|
||||||
|
use roc_ast::mem_pool::pool_str::PoolStr;
|
||||||
use roc_ast::parse::parse_ast;
|
use roc_ast::parse::parse_ast;
|
||||||
use roc_ast::pool::pool_str::PoolStr;
|
|
||||||
use roc_code_markup::markup::nodes::ast_to_mark_nodes;
|
use roc_code_markup::markup::nodes::ast_to_mark_nodes;
|
||||||
use roc_code_markup::slow_pool::{MarkNodeId, SlowPool};
|
use roc_code_markup::slow_pool::{MarkNodeId, SlowPool};
|
||||||
use roc_load::file::LoadedModule;
|
use roc_load::file::LoadedModule;
|
||||||
|
@ -57,7 +57,7 @@ pub fn init_model<'a>(
|
||||||
) -> EdResult<EdModel<'a>> {
|
) -> EdResult<EdModel<'a>> {
|
||||||
let mut module = EdModule::new(code_str, env, code_arena)?;
|
let mut module = EdModule::new(code_str, env, code_arena)?;
|
||||||
|
|
||||||
let mut mark_node_pool = SlowPool::new();
|
let mut mark_node_pool = SlowPool::default();
|
||||||
|
|
||||||
let markup_ids = if code_str.is_empty() {
|
let markup_ids = if code_str.is_empty() {
|
||||||
EmptyCodeString {}.fail()
|
EmptyCodeString {}.fail()
|
||||||
|
@ -211,7 +211,7 @@ pub mod test_ed_model {
|
||||||
use bumpalo::Bump;
|
use bumpalo::Bump;
|
||||||
use ed_model::EdModel;
|
use ed_model::EdModel;
|
||||||
use roc_ast::lang::env::Env;
|
use roc_ast::lang::env::Env;
|
||||||
use roc_ast::pool::pool::Pool;
|
use roc_ast::mem_pool::pool::Pool;
|
||||||
use roc_load::file::LoadedModule;
|
use roc_load::file::LoadedModule;
|
||||||
use roc_module::symbol::IdentIds;
|
use roc_module::symbol::IdentIds;
|
||||||
use roc_module::symbol::ModuleIds;
|
use roc_module::symbol::ModuleIds;
|
||||||
|
|
|
@ -59,8 +59,8 @@ use roc_ast::lang::core::def::def2::DefId;
|
||||||
use roc_ast::lang::core::expr::expr2::Expr2;
|
use roc_ast::lang::core::expr::expr2::Expr2;
|
||||||
use roc_ast::lang::core::expr::expr2::ExprId;
|
use roc_ast::lang::core::expr::expr2::ExprId;
|
||||||
use roc_ast::lang::core::types::Type2;
|
use roc_ast::lang::core::types::Type2;
|
||||||
use roc_ast::pool::pool::Pool;
|
use roc_ast::mem_pool::pool::Pool;
|
||||||
use roc_ast::pool::pool_str::PoolStr;
|
use roc_ast::mem_pool::pool_str::PoolStr;
|
||||||
use roc_ast::solve_type;
|
use roc_ast::solve_type;
|
||||||
use roc_can::expected::Expected;
|
use roc_can::expected::Expected;
|
||||||
use roc_code_markup::markup::attribute::Attributes;
|
use roc_code_markup::markup::attribute::Attributes;
|
||||||
|
@ -589,7 +589,7 @@ impl<'a> EdModel<'a> {
|
||||||
|
|
||||||
let blank_replacement = MarkupNode::Blank {
|
let blank_replacement = MarkupNode::Blank {
|
||||||
ast_node_id: sel_block.ast_node_id,
|
ast_node_id: sel_block.ast_node_id,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
syn_high_style: HighlightStyle::Blank,
|
syn_high_style: HighlightStyle::Blank,
|
||||||
parent_id_opt: expr2_level_mark_node.get_parent_id_opt(),
|
parent_id_opt: expr2_level_mark_node.get_parent_id_opt(),
|
||||||
newlines_at_end,
|
newlines_at_end,
|
||||||
|
|
|
@ -14,7 +14,7 @@ use crate::ui::text::selection::Selection;
|
||||||
use crate::ui::tooltip::ToolTip;
|
use crate::ui::tooltip::ToolTip;
|
||||||
use crate::ui::ui_error::MissingGlyphDims;
|
use crate::ui::ui_error::MissingGlyphDims;
|
||||||
use cgmath::Vector2;
|
use cgmath::Vector2;
|
||||||
use roc_ast::pool::pool::Pool;
|
use roc_ast::mem_pool::pool::Pool;
|
||||||
use snafu::OptionExt;
|
use snafu::OptionExt;
|
||||||
use winit::dpi::PhysicalSize;
|
use winit::dpi::PhysicalSize;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use roc_ast::lang::core::expr::expr2::Expr2::SmallInt;
|
use roc_ast::lang::core::expr::expr2::Expr2::SmallInt;
|
||||||
use roc_ast::lang::core::expr::expr2::IntStyle;
|
use roc_ast::lang::core::expr::expr2::IntStyle;
|
||||||
use roc_ast::lang::core::expr::expr2::IntVal;
|
use roc_ast::lang::core::expr::expr2::IntVal;
|
||||||
use roc_ast::pool::pool_str::PoolStr;
|
use roc_ast::mem_pool::pool_str::PoolStr;
|
||||||
use roc_code_markup::markup::attribute::Attributes;
|
use roc_code_markup::markup::attribute::Attributes;
|
||||||
use roc_code_markup::markup::nodes::MarkupNode;
|
use roc_code_markup::markup::nodes::MarkupNode;
|
||||||
use roc_code_markup::slow_pool::MarkNodeId;
|
use roc_code_markup::slow_pool::MarkNodeId;
|
||||||
|
@ -49,7 +49,7 @@ pub fn start_new_int(ed_model: &mut EdModel, digit_char: &char) -> EdResult<Inpu
|
||||||
content: digit_string,
|
content: digit_string,
|
||||||
ast_node_id,
|
ast_node_id,
|
||||||
syn_high_style: HighlightStyle::Number,
|
syn_high_style: HighlightStyle::Number,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
parent_id_opt,
|
parent_id_opt,
|
||||||
newlines_at_end: curr_mark_node_nls,
|
newlines_at_end: curr_mark_node_nls,
|
||||||
};
|
};
|
||||||
|
|
|
@ -67,7 +67,7 @@ pub fn start_new_let_value(ed_model: &mut EdModel, new_char: &char) -> EdResult<
|
||||||
content: val_name_string,
|
content: val_name_string,
|
||||||
ast_node_id,
|
ast_node_id,
|
||||||
syn_high_style: HighlightStyle::Variable,
|
syn_high_style: HighlightStyle::Variable,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
parent_id_opt: Some(curr_mark_node_id),
|
parent_id_opt: Some(curr_mark_node_id),
|
||||||
newlines_at_end: curr_mark_node_nls,
|
newlines_at_end: curr_mark_node_nls,
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use roc_ast::lang::core::ast::{ast_node_to_string, ASTNodeId};
|
use roc_ast::lang::core::ast::{ast_node_to_string, ASTNodeId};
|
||||||
use roc_ast::lang::core::expr::expr2::{Expr2, ExprId};
|
use roc_ast::lang::core::expr::expr2::{Expr2, ExprId};
|
||||||
use roc_ast::pool::pool_vec::PoolVec;
|
use roc_ast::mem_pool::pool_vec::PoolVec;
|
||||||
use roc_code_markup::markup::common_nodes::{
|
use roc_code_markup::markup::common_nodes::{
|
||||||
new_blank_mn, new_comma_mn, new_left_square_mn, new_right_square_mn,
|
new_blank_mn, new_comma_mn, new_left_square_mn, new_right_square_mn,
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
use roc_ast::lang::core::expr::expr2::{Expr2, ExprId};
|
use roc_ast::lang::core::expr::expr2::{Expr2, ExprId};
|
||||||
use roc_ast::pool::pool_str::PoolStr;
|
use roc_ast::mem_pool::pool_str::PoolStr;
|
||||||
use roc_code_markup::slow_pool::MarkNodeId;
|
use roc_code_markup::slow_pool::MarkNodeId;
|
||||||
|
|
||||||
use crate::editor::ed_error::EdResult;
|
use crate::editor::ed_error::EdResult;
|
||||||
|
|
|
@ -11,8 +11,8 @@ use roc_ast::lang::core::ast::ASTNodeId;
|
||||||
use roc_ast::lang::core::expr::expr2::Expr2;
|
use roc_ast::lang::core::expr::expr2::Expr2;
|
||||||
use roc_ast::lang::core::expr::expr2::ExprId;
|
use roc_ast::lang::core::expr::expr2::ExprId;
|
||||||
use roc_ast::lang::core::expr::record_field::RecordField;
|
use roc_ast::lang::core::expr::record_field::RecordField;
|
||||||
use roc_ast::pool::pool_str::PoolStr;
|
use roc_ast::mem_pool::pool_str::PoolStr;
|
||||||
use roc_ast::pool::pool_vec::PoolVec;
|
use roc_ast::mem_pool::pool_vec::PoolVec;
|
||||||
use roc_code_markup::markup::attribute::Attributes;
|
use roc_code_markup::markup::attribute::Attributes;
|
||||||
use roc_code_markup::markup::common_nodes::new_blank_mn;
|
use roc_code_markup::markup::common_nodes::new_blank_mn;
|
||||||
use roc_code_markup::markup::common_nodes::new_left_accolade_mn;
|
use roc_code_markup::markup::common_nodes::new_left_accolade_mn;
|
||||||
|
@ -126,7 +126,7 @@ pub fn update_empty_record(
|
||||||
content: new_input.to_owned(),
|
content: new_input.to_owned(),
|
||||||
ast_node_id,
|
ast_node_id,
|
||||||
syn_high_style: HighlightStyle::RecordField,
|
syn_high_style: HighlightStyle::RecordField,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
parent_id_opt,
|
parent_id_opt,
|
||||||
newlines_at_end: 0,
|
newlines_at_end: 0,
|
||||||
};
|
};
|
||||||
|
@ -235,7 +235,7 @@ pub fn update_record_colon(
|
||||||
content: record_colon.to_owned(),
|
content: record_colon.to_owned(),
|
||||||
ast_node_id: ASTNodeId::AExprId(record_ast_node_id),
|
ast_node_id: ASTNodeId::AExprId(record_ast_node_id),
|
||||||
syn_high_style: HighlightStyle::Operator,
|
syn_high_style: HighlightStyle::Operator,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
parent_id_opt: Some(parent_id),
|
parent_id_opt: Some(parent_id),
|
||||||
newlines_at_end: 0,
|
newlines_at_end: 0,
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use roc_ast::lang::core::expr::expr2::ArrString;
|
use roc_ast::lang::core::expr::expr2::ArrString;
|
||||||
use roc_ast::lang::core::expr::expr2::Expr2;
|
use roc_ast::lang::core::expr::expr2::Expr2;
|
||||||
use roc_ast::lang::core::str::update_str_expr;
|
use roc_ast::lang::core::str::update_str_expr;
|
||||||
use roc_ast::pool::pool_str::PoolStr;
|
use roc_ast::mem_pool::pool_str::PoolStr;
|
||||||
use roc_code_markup::markup::attribute::Attributes;
|
use roc_code_markup::markup::attribute::Attributes;
|
||||||
use roc_code_markup::markup::nodes;
|
use roc_code_markup::markup::nodes;
|
||||||
use roc_code_markup::markup::nodes::MarkupNode;
|
use roc_code_markup::markup::nodes::MarkupNode;
|
||||||
|
@ -150,7 +150,7 @@ pub fn start_new_string(ed_model: &mut EdModel) -> EdResult<InputOutcome> {
|
||||||
content: nodes::STRING_QUOTES.to_owned(),
|
content: nodes::STRING_QUOTES.to_owned(),
|
||||||
ast_node_id,
|
ast_node_id,
|
||||||
syn_high_style: HighlightStyle::String,
|
syn_high_style: HighlightStyle::String,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
parent_id_opt,
|
parent_id_opt,
|
||||||
newlines_at_end: curr_mark_node_nls,
|
newlines_at_end: curr_mark_node_nls,
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,7 +8,7 @@ use roc_ast::{
|
||||||
},
|
},
|
||||||
env::Env,
|
env::Env,
|
||||||
},
|
},
|
||||||
pool::pool::NodeId,
|
mem_pool::pool::NodeId,
|
||||||
};
|
};
|
||||||
use roc_code_markup::{
|
use roc_code_markup::{
|
||||||
markup::{
|
markup::{
|
||||||
|
@ -49,7 +49,7 @@ pub fn tld_mark_node<'a>(
|
||||||
content: val_name,
|
content: val_name,
|
||||||
ast_node_id,
|
ast_node_id,
|
||||||
syn_high_style: HighlightStyle::Variable,
|
syn_high_style: HighlightStyle::Variable,
|
||||||
attributes: Attributes::new(),
|
attributes: Attributes::default(),
|
||||||
parent_id_opt: None,
|
parent_id_opt: None,
|
||||||
newlines_at_end: 0,
|
newlines_at_end: 0,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue