mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 15:51:12 +00:00
can now convert builtin calls to markup
This commit is contained in:
parent
c322d11e2a
commit
45df20cb17
4 changed files with 20 additions and 13 deletions
|
@ -30,10 +30,7 @@ use roc_ast::{
|
|||
env::Env,
|
||||
},
|
||||
};
|
||||
use roc_module::{
|
||||
module_err::ModuleResult,
|
||||
symbol::{get_module_ident_ids, Interns},
|
||||
};
|
||||
use roc_module::{module_err::ModuleResult, symbol::Interns};
|
||||
|
||||
// make Markup Nodes: generate String representation, assign Highlighting Style
|
||||
pub fn expr2_to_markup<'a>(
|
||||
|
@ -46,6 +43,9 @@ pub fn expr2_to_markup<'a>(
|
|||
) -> ASTResult<MarkNodeId> {
|
||||
let ast_node_id = ASTNodeId::AExprId(expr2_node_id);
|
||||
|
||||
// for debugging
|
||||
//println!("EXPR2 {:?}", expr2);
|
||||
|
||||
let mark_node_id = match expr2 {
|
||||
Expr2::SmallInt { text, .. }
|
||||
| Expr2::I128 { text, .. }
|
||||
|
@ -112,8 +112,7 @@ pub fn expr2_to_markup<'a>(
|
|||
mark_node_pool.add(call_node)
|
||||
}
|
||||
Expr2::Var(symbol) => {
|
||||
let text = get_module_ident_ids(&interns.all_ident_ids, &env.home)?
|
||||
.get_name_str_res(symbol.ident_id())?;
|
||||
let text = symbol.fully_qualified(interns, env.home);
|
||||
|
||||
new_markup_node(
|
||||
text.to_string(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue