Home /Modules/impl/versioned.sleela

versioned.sleela

impl/examples/versioned.sleela · 14 line(s) · sleela

#sleela 2.1
// versioned.sleela -- demonstrates SL-META-0001 Section 4.4 syntax versioning.
//
// The `#sleela 1.3` pragma on the first non-blank, non-comment line declares
// the syntax version this Wrapper(TM) conforms to. The compiler is version
// aware: it accepts this file because 1.3 is within its supported range
// (1.3 .. 1.6), and it would reject a file that declared a version older than
// the floor or newer than the compiler supports.
class Versioned {
    void main() {
        print("Sleela syntax 1.0 -- accepted by a version-aware compiler.");
    }
}