Coder Social home page Coder Social logo

Comments (4)

JordanBoltonMN avatar JordanBoltonMN commented on May 22, 2024

I don't believe this is a bug. Recursive functions should have the @ prefix, and if you add that prefix then the parser doesn't experience an error.

Thoughts?

from powerquery-parser.

bgribaudo avatar bgribaudo commented on May 22, 2024

Hi @JordanBoltonMN,

Thanks for taking a look at this!

Recursive functions should have the @ prefix[....]

I believe this is only true when the identifier being referenced is a record field or let expression variable.

From the language specification's discussion on Identifier references:

It is an error for an exclusive-identifier-reference to refer to an identifier that is currently being initialized if the referenced identifier is defined inside a record-initializer-expression or let-expression.

In this issue, the referenced identifier is a section member, so based on the above quote from the language specification (and as discussed in MicrosoftDocs/query-docs#9 (comment)), I believe an exclusive identifier reference (no @) should be considered valid in this case.

from powerquery-parser.

JordanBoltonMN avatar JordanBoltonMN commented on May 22, 2024

I believe you're right in that it's not a requirement on section members. If I had to guess this was a bug in the C# parser that went unnoticed, but in any case it's been shipped for who knows how long so it's now a feature. I'll have to update the scope generation for section members to include both @name and name.

from powerquery-parser.

bgribaudo avatar bgribaudo commented on May 22, 2024

Thank you, @JordanBoltonMN!

from powerquery-parser.

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.