Skip to content

Compiling rules with custom types #219

Description

@sdjacobs

It seems that I can't create types that have members which are also custom types, when I am compiling with the nools executable. For example, the following code compiles correctly in Javascript with nools.compile(__dirname + "/test.nools"). However, when I run nools compile test.nools I get the error "ReferenceError: Message is not defined".

define Message {
  text: String,
  constructor : function(text) { this.text = text }
}

define Greeting {
  msg: Message,
  constructor : function(msg) { this.msg = msg }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions