diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b69a54..8d2a8df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - +## [Unreleased] + +### Fixed + +- Fix a problem with error struct generation with some lexicons in `deflexicon`. ## [0.9.0] - 2026-04-16 diff --git a/lib/atex/lexicon.ex b/lib/atex/lexicon.ex index 72d98d5..120eeb1 100644 --- a/lib/atex/lexicon.ex +++ b/lib/atex/lexicon.ex @@ -806,14 +806,11 @@ defmodule Atex.Lexicon do {{:., [], [{:__aliases__, [alias: false], [single]}, :t]}, [], []} multiple -> - {:|, [], - [ - {:|, [], - Enum.map(multiple, fn atom -> - {{:., [], [{:__aliases__, [alias: false], [atom]}, :t]}, [], []} - end)}, - nil - ]} + multiple + |> Enum.map(fn atom -> + {{:., [], [{:__aliases__, [alias: false], [atom]}, :t]}, [], []} + end) + |> then(&join_with_pipe(&1 ++ [nil])) end error_structs =