Skip to content

Commit 2f60f34

Browse files
committed
add class diagrams for semantic tokens & validation
1 parent 25ac768 commit 2f60f34

File tree

3 files changed

+49
-1
lines changed

3 files changed

+49
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ src/language/generated/
1010
syntaxes/
1111
.idea
1212
.DS_Store
13-
cml-ls/
13+
cml-ls/
14+
docs/*.png

docs/class_semantic_tokens.puml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@startuml
2+
abstract class AbstractSemanticTokenProvider
3+
4+
class ContextMapperDslSemanticTokenProvider {
5+
# highlightElement(AstNode, SemanticTokenAcceptor)
6+
}
7+
8+
class SemanticTokenProviderRegistry {
9+
+ get(AstNode): ContextMapperSemanticTokenProvider<AstNode>
10+
}
11+
12+
interface ContextMapperSemanticTokenProvider {
13+
+ supports(AstNode): boolean
14+
+ highlight(T, SemanticTokenAcceptor)
15+
}
16+
17+
AbstractSemanticTokenProvider <|-- ContextMapperDslSemanticTokenProvider
18+
ContextMapperDslSemanticTokenProvider --> SemanticTokenProviderRegistry
19+
SemanticTokenProviderRegistry o-- "0..*" ContextMapperSemanticTokenProvider
20+
@enduml
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
@startuml
2+
abstract class ValidationRegistry {
3+
+ register(ValidationChecks<T>, ThisParameterType)
4+
}
5+
6+
class ContextMapperDslValidationRegistry {
7+
}
8+
9+
class ContextMapperDslValidator {
10+
+ checkContextMappingModel(ContextMappingModel, ValidationAcceptor)
11+
+ checkValue(Value, ValidationAcceptor)
12+
}
13+
14+
class ContextMapperValidationProviderRegistry {
15+
+ get(AstNode): ContextMapperValidationProvider<AstNode>
16+
}
17+
18+
interface ContextMapperValidationProvider {
19+
+ supports(AstNode): boolean
20+
+ validate(T, ValidationAcceptor)
21+
}
22+
23+
ValidationRegistry <|-- ContextMapperDslValidationRegistry
24+
ContextMapperDslValidationRegistry --> ContextMapperDslValidator
25+
ContextMapperDslValidator --> ContextMapperValidationProviderRegistry
26+
ContextMapperValidationProviderRegistry o-- "0..*" ContextMapperValidationProvider
27+
@enduml

0 commit comments

Comments
 (0)