Skip to content

Commit

Permalink
format and small typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jutho committed Aug 3, 2023
1 parent 7b7f438 commit 0a92fe2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/indexnotation/tensormacros.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ macro tensor(args::Vararg{Expr})
end

function tensorparser(tensorexpr, kwargs...)

parser = TensorParser()

for param in kwargs
Expand Down Expand Up @@ -102,8 +101,10 @@ function parse_tensor_kwargs(args)

# @tensor kw1=val1 kw2=val2 ... tensorexpr
function kw_to_pair(ex)
return (isexpr(ex, :(=), 2) || isexpr(ex, :kw, 2)) ? Pair(ex.args[1], ex.args[2]) : ex
throw(ArgumentError("unknown keyword expression `$ex`"))
if (isexpr(ex, :(=), 2) || isexpr(ex, :kw, 2))
return Pair(ex.args[1], ex.args[2])
end
throw(ArgumentError("unknown keyword expression `$ex`"))
end
return kw_to_pair.(args)
end
Expand Down

2 comments on commit 0a92fe2

@Jutho
Copy link
Owner Author

@Jutho Jutho commented on 0a92fe2 Aug 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/88955

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v4.0.1 -m "<description of version>" 0a92fe2a5e1e363f2adfeaad1281befff0053f86
git push origin v4.0.1

Please sign in to comment.