Repository navigation
Conversation
The keyword list of the CML syntax highlighting is now generated from the Xtext grammars of the DSL (ContextMappingDSL.xtext, TacticDDDLanguage.xtext), the same list the Rouge lexer of the website uses. Keywords that were missing (e.g. ApplicationPart, read-only, initiated by, persistent, the enum values NORMAL, RARELY, OFTEN, HUGE, TINY) are highlighted now; multi-word keywords are matched as a whole and the built-in types use their own scope (support.type.cml).
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CML syntax highlighting only knew part of the language. Its keyword list is now generated from the Xtext grammars of the DSL (
ContextMappingDSL.xtext,TacticDDDLanguage.xtexton master), so it matches the Rouge lexer on the website (contextmapper.github.io#111).Changes
ApplicationPart,TacticDDDApplication,persistent,inject,groupBy,orderBy,databaseJoinTable,NORMAL,RARELY,OFTEN,HUGE,TINY,GENESIS,COMMODITY.read-onlyused to show up asreadplus-only;initiated by,In the context of the SOI,,stakeholders expect it to promote, protect or createandwith the following externally observable and/or internally auditable behavior:were never matched completely.true,subscribe to(the grammar hassubscribe…to), and the broken parts of the multi-word keywords above.String,int,List, …) get thesupport.type.cmlscope, so themes can colour them differently from keywords.comment.line.double-slash.cml(it wasdouble-dash).Verification
I tokenized all 315
.cmlfiles of the DSL repo with vscode-textmate and vscode-oniguruma, using the old and the new grammar. Every token that was highlighted before still is, either as a keyword or, for the types, assupport.type. The only additions are the keywords listed above. I also tested the multi-word Value Register keywords with a separate file.#44 and #45 add
nonResponsibilitiesandInvariantto the old lists. After this is merged I'll rebase them so that each adds its keyword to the new list.