-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate language meta data #170
Conversation
Great! Exactly what I need. We need to decide about having a leading |
Leading |
I prefer the |
* DO NOT EDIT MANUALLY! | ||
******************************************************************************/ | ||
|
||
export class ArithmeticsLanguageMetaData { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case I'd rather use a plain object than a class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, that makes sense. Should the object this be generated into a meta-data.ts
file, or should it be build in the generated injection module? like this:
LanguageMetaData: () => ({
languageId: 'id',
extensions: ['.id']
})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exporting a const
for it could be useful so you can access it directly in your language implementation. But it could be in the generated/module.ts
instead of a new file to keep the number of generated files low.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, yeah I agree with that.
|
||
export interface LanguageMetaData { | ||
languageId: string; | ||
extensions: string[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we name this property fileExtensions
for clarity? "extensions" is quite generic.
Closes #168
Adds a dedicated
LanguageMetaData
service to each language.