How can I remove primitives from baseLanguage?

I don't want to use some primitive types from java.
Can I change name of 'boolean'?



And why does baseLanguage include java?
Expressions and statements can be 'base', but jvm primitives should be 'jvmBase'
10 comments
1. I believe, you can define a checking rule that will report usages of such types as errors.
2. You could define an alternative editor for "boolean", if that would help in your case. Or define a type of your own.
3. BaseLanguage has been created as a clone of Java, so it contains all the concepts that Java has. It has never been meant as a universal expression language, even though such a language would certainly be very useful for DSL authors.
0
Thanks..
But how can I achieve 2? I have no idea how can I set mps to treat 'true' and 'false' as 'bool' instead of 'boolean'
0
It depends what you want to achieve. The simplest solution is to provide an alternative editor for BooleanType, so that only the visual appearance of the concept changes, if the user decides to view the code with the alternative editor - https://confluence.jetbrains.com/display/MPSD32/Editor+cookbook#Editorcookbook-Howtodefinemultipleeditorsforthesameconcept

A more elaborate solution would include creating your own type and defining sub-typing rules between your type and BooleanType.
0
I'm working on it.. but I can't define a new primitive data type without baseLanguage or jvm.
But I have no idea how to solve 'type boolean is not a subtype of string'.
And I can't find any guide for this from MPSD32 – Single page version.





Now I find that I can't use light quotation in typesystem - typeof.
Is this a known issue?
0
The single-page user guide for 3.2 is not ready yet. Please use the multi-page version at https://confluence.jetbrains.com/display/MPSD32/MPS+User%27s+Guide

As for light quotations - have you imported the jetbrains.mps.lang.quotation language into the type system model? Can you use ordinary quotations in the typesystem?
0
I'd tried default type (like BooleanType) and it works. (becomes '<boolean>') but even after adding 'jetbrains.mps.lang.quotation' to used language, I can't use light quotation.
0
Do you mean that "<light quotation>" is not in the completion menu, while "<quotation>" is?
0
Nope, I mean my concepts like '<BoolType>'.
0
I guess you are getting confused here over the visual appearance of quotations and light quotations.
Maybe checking the quotation page (https://confluence.jetbrains.com/display/MPSD32/Quotations) could help shed some light into the problem?

Vaclav
0
Ah, my mistake. I meant '<BoolType()>'.

And now I use 'new node<BoolType>()'.
0

Please sign in to leave a comment.