Skip to content

Commit

Permalink
cosmetic
Browse files Browse the repository at this point in the history
  • Loading branch information
darky committed Jun 8, 2024
1 parent ab2a826 commit 0330ef3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/glerd.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,15 @@ pub fn generate(root) {
content
})
|> it_act_map(fn(content) {
let assert Ok(module) = glance.module(content)
let lexems = content |> glexer.new |> glexer.lex
use <- state.update(fn(ctx) { Context(..ctx, lexems: lexems) })
fn(ctx) { #(ctx, module) }
fn(ctx) { #(ctx, content) }
})
|> iterator.map(act.flatten)
|> it_act_map(fn(content) {
let assert Ok(module) = glance.module(content)
module
})
|> it_act_map(fn(module) {
let Module(_, custom_types_definitions, ..) = module
iterator.from_list(custom_types_definitions)
Expand Down

0 comments on commit 0330ef3

Please sign in to comment.