corenova / yang-js

YANG parser and composer
Apache License 2.0
56 stars 18 forks source link

Questions about tutorials #87

Closed kimguji closed 5 years ago

kimguji commented 5 years ago

Hello, this is not an issue, it is a question. I tried to use this code for YANG data parsing(javascript). However, I can not understand some part of the tutorial. Some code does not follow javascript syntax, and it makes me confused.

  1. In tutorial the authors used " """ " for multiline string. This is for python, not javascript. right? Am I doing something wrong? please tell me. After I changed " """ " to "` " it works..
  2. In tutorial, I found '(Yang schema)', and when I try to build with node, an error occurred. var model= (Yang schema) { ^^^^^^

SyntaxError: Unexpected identifier I fixed it to schema.eval(yang instance) and it works now.

I'm so confused. If I am doing something wrong, please tell me. Thanks in advance.

sekur commented 5 years ago

@kimguji - the framework is written in coffeescript and I wrote the examples likewise. I'll need to update the docs to vanilla JavaScript...

kimguji commented 5 years ago

@saintkepha - Thanks for your quick reply. It resolved my questions.