Sourceror.parse_string

You're seeing just the function parse_string, go back to Sourceror module for more information.

Specs

parse_string(String.t()) :: Macro.t()

Parses the source code into an extended AST suitable for source manipulation as described in Code.quoted_to_algebra/2.

Two additional fields are added to nodes metadata:

  • :leading_comments - a list holding the comments found before the node.
  • :trailing_comments - a list holding the comments found before the end of the node. For example, comments right before the end keyword.

Comments are the same maps returned by Code.string_to_quoted_with_comments/2.