HostKit.ShellScript (host_kit v0.1.0-beta.0)

Copy Markdown View Source

A parsed Bash script with static command analysis metadata.

Summary

Types

command_ref()

@type command_ref() :: %{
  name: String.t(),
  line: pos_integer() | nil,
  column: pos_integer() | nil
}

t()

@type t() :: %HostKit.ShellScript{
  ast: term(),
  commands: [command_ref()],
  source: String.t()
}

Functions

parse(source)

@spec parse(String.t()) :: {:ok, t()} | {:error, term()}

parse!(source)

@spec parse!(String.t()) :: t()