Skip to content

Expand sigil_CURL in Mix task#36

Draft
kevinschweikert wants to merge 2 commits intoderekkraan:mainfrom
kevinschweikert:feature/sigil-expansion
Draft

Expand sigil_CURL in Mix task#36
kevinschweikert wants to merge 2 commits intoderekkraan:mainfrom
kevinschweikert:feature/sigil-expansion

Conversation

@kevinschweikert
Copy link
Collaborator

Closes #23

With mix curl_req.expand all the files in the lib directory are getting scanned for a sigil_CURL in their AST. I don't know what the preferred scope of files should be. This is currently a draft, because while it works with this code

def test do
  ~CURL(https://example.com)
end

it does not, because Sourceror.get_range(quoted) returns nil because somehow it cannot infer the range of the sigil when we do something like this:

def test do
  ~CURL(https://example.com) == true
end

If anybody has a solution, i would be very happy for some help or hints in the direction!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add mix task (or Ash Injector?) to replace ~CURL with %Req.Request{}

1 participant