Skip to content

Expr constructor sometimes returns a Symbol, Bool, etc #308

@timholy

Description

@timholy

Examples:

Symbol("@", normalize_julia_identifier(valof(x.args[2])))
else
Symbol(normalize_julia_identifier(valof(x.args[2])))
end
else
return Symbol(normalize_julia_identifier(valof(x)))

I worry it's troubling to claim to be a constructor of a type and not return that type. That method could be called expr_or_symbol, or it could always return an Expr the way that Base does.

EDIT: but _literal_expr is going to be real trouble. Maybe this should be expr_or_literal?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions