Skip to content

to add new command line argument -copy #434

Description

@Graur

We need to add new command line argument -copy. Which will copy files from https://github.com/polystat/c2eo/tree/master/project/eo-lib next the main translated .eo file.

e.g. I want to translate this C file:

int foo(int x) {
    return 42 / x;
}

to EO file. I run docker run -v $(pwd):/eo yegor256/c2eo:0.1.24 foo.c foo.eo and get this part of foo.eo:

+alias c2eo.coperators.plus
+alias c2eo.coperators.ram
+alias c2eo.coperators.read-as-int32
+alias c2eo.coperators.write-as-int32
+package c2eo.src.global

[args...] > global

...

But when I try to compile EO file I get error:

Failed while trying to pull /Users/…/c2eo/coperators/address.eo

Because address.eo is an internal library in c2eo.
So, we need to have opportunity to copy these files and place them near the translated .eo file by adding a new argument:

c2eo -copy foo.c

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions