hetu_script 0.0.3 copy "hetu_script: ^0.0.3" to clipboard
hetu_script: ^0.0.3 copied to clipboard

outdated

Hetu is a lightweight script language written in Dart,intended to be embedded in Dart programs.

example/example.dart

import 'package:hetu_script/hetu_script.dart';

void main() async {
  var hetu = await Hetu.init();

  hetu.eval('''
      class Person {
        var name: String = 'some person'
        fun greeting {
          print("Hi! I'm", name)
        }
      }

      class Jimmy extends Person {
        construct (the_name: String) {
          name = the_name
        }

        fun greeting {
          print("Hi! I'm", name)
        }
      }
      
      fun main {

        var p = Person()
        p.greeting()
        
        var j = Jimmy('Jimmy')
        j.greeting()

      }
      ''', invokeFunc: 'main');
}
48
likes
0
pub points
63%
popularity

Publisher

verified publisherhetu.dev

Hetu is a lightweight script language written in Dart,intended to be embedded in Dart programs.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on hetu_script