TelluIoT / ThingML

The ThingML modelling language
https://github.com/TelluIoT/ThingML
Apache License 2.0
102 stars 32 forks source link

thing fragments defined in separate files and included one by one are not compiled #52

Closed vassik closed 6 years ago

vassik commented 10 years ago

Consider the following three files:

testA.thingml

import "../../thingml.thingml"

thing fragment A {

    function a() do
        print "a()\n"
    end
}

testB.thingml

import "../../thingml.thingml"
import "testA.thingml"

thing fragment B includes A {

    function b() do
        print "b()\n"
        a()
    end
}

testC.thingml

import "../../thingml.thingml"
import "testB.thingml"

thing fragment C includes B {

    function c() do
        print "c()\n"
        b()
        a()
    end
}

configuration testSeveralFiles {

 instance c : C
}

The thing C cannot call a() from A. On attempt to compile, a NULL pointer exception throws...

brice-morin commented 7 years ago

Hopefully the new parser solves this issue. @ffleurey ?

brice-morin commented 7 years ago

@ffleurey ?

jakhog commented 6 years ago

There are tests for this now. The Jenkins seems to be down right now, but at least they pass for Go and NodeJS on my computer. So I'm going to assume that this is fixed.