Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling rules with custom types #219

Open
sdjacobs opened this issue Apr 10, 2017 · 0 comments
Open

Compiling rules with custom types #219

sdjacobs opened this issue Apr 10, 2017 · 0 comments

Comments

@sdjacobs
Copy link

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 }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants