Git Product home page Git Product logo

Comments (3)

sekur avatar sekur commented on June 22, 2024

It should be a test case inside list. The order of the statements is what's
causing the issue (although it shouldn't matter in this context).

If you swap the order, "uses quisling" before "key" statement, it will work
properly. It's because the leaf item referenced by "key" doesn't yet exist
in the schema node being resolved since "uses" has yet to be resolved.

I'll see how I can change this up a bit to have the list resolve handler
process any uses statement before any other statements.
On Fri, Aug 5, 2016 at 1:54 AM Henrik Hugo [email protected] wrote:

The following code references a key in a grouping and fails parsing.

module foo {
grouping quisling {
leaf first {
type string;
}
leaf second {
type int32;
}
}
container top {
list kek {
key "first";
uses quisling;
}
}
}

ExpressionError: foo/top/kek/key[first] referenced key items do not have
leaf elements

I can write a test for this case but I'm unsure where it would fit.
list.coffee or maybe grouping.coffee


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#19, or mute the thread
https://github.com/notifications/unsubscribe-auth/AA6KbKdL2ApSxtW3Z8KvqEVT5cJ0o7sLks5qcvpfgaJpZM4Jde9P
.

Peter Lee
Corenova Technologies
+1 310 400 6450
[email protected]

from yang-js.

demonicblue avatar demonicblue commented on June 22, 2024

Ok, thanks for the tip.

from yang-js.

sekur avatar sekur commented on June 22, 2024

@demonicblue - thanks for catching this issue. Please feel free to review the commit to see how I've resolved it.

from yang-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.