Skip to content

Ruby builder needs to be able to build literals from Ruby constants #9

@louismrose

Description

@louismrose

Suppose we have the following program:

net * VAT

We cannot currently construct Metamorpher terms to match this program using the Ruby builder:

require "metamorpher"
built = Metamorpher.builder.build("net * VAT")  # => send(send(, net), *, VAT) 
built.children.last # => VAT
built.children.last.class #= > Metamorpher::Terms::Variable

This is because all uppercase constants are treated as variables, but in this case we wish to treat VAT as a literal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions