Coder Social home page Coder Social logo

Comments (6)

msujew avatar msujew commented on May 22, 2024

The value keyword doesn't convey a lot of meaning to me (unlike terminal or enum) because it is quite generic. I'd use a keyword like datatype. WDYT, @spoenemann?

Also, the we commonly use assignments with a value feature. Declaring value as a keyword, would force the user to escape it everytime.

from langium.

spoenemann avatar spoenemann commented on May 22, 2024

Right, we should be careful introducing new keywords because of name clashes with user-defined properties (I prefer the term "property" over "feature"; the latter is quite EMF-specific).

I though about value because of the ValueConverter service. IMO the term "datatype" is not fully clear as well. Is primitive more descriptive?

from langium.

msujew avatar msujew commented on May 22, 2024

I like primitive. Is the corresponding rule type PrimitiveRule as well?

from langium.

spoenemann avatar spoenemann commented on May 22, 2024

👍

Should it be PrimitiveConverter then to make clear that it applies to terminal rules as well as primitive rules?

from langium.

msujew avatar msujew commented on May 22, 2024

Sure, since it basically only converts string (and maybe number) values right? A ValueConverter in my eyes could be used to transform the whole AST.

from langium.

spoenemann avatar spoenemann commented on May 22, 2024

In Xtext you can define value converters that create complex types like LocalDate. I'm not sure whether we want to support that.

from langium.

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.