Skip to content

Commit e1fbf75

Browse files
committed
Add double quote atoms
1 parent a313549 commit e1fbf75

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/gradient/elixir_expr.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ defmodule Gradient.ElixirExpr do
3535
def pp_expr({:atom, _, val}) do
3636
case Atom.to_string(val) do
3737
"Elixir." <> mod -> mod
38-
str -> ":" <> str
38+
str -> ":\"" <> str <> "\""
3939
end
4040
end
4141

@@ -420,7 +420,7 @@ defmodule Gradient.ElixirExpr do
420420

421421
if shortand_syntax do
422422
{:atom, _, key} = key
423-
Atom.to_string(key) <> ": " <> value
423+
"\"" <> Atom.to_string(key) <> "\": " <> value
424424
else
425425
pp_expr(key) <> " => " <> value
426426
end

lib/gradient/elixir_type.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ defmodule Gradient.ElixirType do
8484
end
8585

8686
def pretty_print({:atom, _, val}) do
87-
":" <> Atom.to_string(val)
87+
case Atom.to_string(val) do
88+
"Elixir." <> mod -> mod
89+
str -> ":\"" <> str <> "\""
90+
end
8891
end
8992

9093
def pretty_print({:integer, _, val}) do

0 commit comments

Comments
 (0)