-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Partially revert "drop support for elixir 1.12"
- Loading branch information
1 parent
cbde019
commit 28f0ca5
Showing
3 changed files
with
42 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
defmodule ElixirSense.Core.Normalized.Code.CursorContext do | ||
@moduledoc false | ||
|
||
def cursor_context(string, opts \\ []) | ||
|
||
# credo:disable-for-lines:10 | ||
def cursor_context(binary, opts) do | ||
cond do | ||
Version.match?(System.version(), ">= 1.13.0") -> | ||
apply(Code.Fragment, :cursor_context, [binary, opts]) | ||
|
||
true -> | ||
apply(Code, :cursor_context, [binary, opts]) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters