Skip to content

Commit

Permalink
No single Symbol allowed in line
Browse files Browse the repository at this point in the history
  • Loading branch information
tomyun committed Jun 11, 2020
1 parent 6804b68 commit 50bd92a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/macro.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct VarInfo{S<:Union{Symbol,Nothing}}
state::S
type::Union{Symbol,Expr,Nothing}
tags::Dict{Symbol,Any}
line::Union{Expr,Symbol}
line::Expr
linenumber::LineNumberNode
docstring::String
end
Expand All @@ -32,7 +32,7 @@ show(io::IO, v::VarInfo) = begin
println(io, "docstring: $(v.docstring)")
end

VarInfo(system::Symbol, line::Union{Expr,Symbol}, linenumber::LineNumberNode, docstring::String) = begin
VarInfo(system::Symbol, line::Expr, linenumber::LineNumberNode, docstring::String) = begin
# name[(args..; kwargs..)][: alias] [=> body] [~ [state][::type][(tags..)]]
@capture(line, (decl_ ~ deco_) | decl_)
@capture(deco, state_::type_(tags__) | ::type_(tags__) | state_(tags__) | state_::type_ | ::type_ | state_)
Expand Down

0 comments on commit 50bd92a

Please sign in to comment.