📅  最后修改于: 2023-12-03 15:35:10.261000             🧑  作者: Mango
Stringify is a package for Atom that generates a string representation of Elixir code. It helps in debugging and understanding complex Elixir code by converting Elixir expressions to a string representation.
This package is useful for Elixir developers who want to visualize their code as strings and for those who are new to Elixir and want to understand how complex Elixir expressions are represented as strings.
File -> Settings -> Install
stringify-elixir
in the search boxInstall
To stringify a selected Elixir expression, you can use the following shortcuts:
ctrl-shift-p
(on Windows and Linux) or cmd-shift-p
(on macOS) to open the Command Palette
Stringify Elixir
and select itEnter
You can also use the Stringify:
context menu to stringify an expression.
Let's say you have the following Elixir code:
defmodule Calculator do
def add(a, b) do
a + b
end
end
Select the expression a + b
and use the Stringify Elixir
command to generate the following string representation:
{:`,`, [context: Elixir, import: Kernel], [{:var, [context: Elixir, import: Kernel], [:a]}, {:var, [context: Elixir, import: Kernel], [:b]}]}
Stringify is a useful package for Atom that generates a string representation of Elixir code. It can be used for debugging and understanding complex Elixir code. The package is easy to install and use, and it can produce detailed string representations of Elixir expressions.