Skip to content

Commit

Permalink
structurizr-dsl: Allows !identifiers to be used inside model.
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Brown committed Feb 16, 2024
1 parent b0d7e5a commit 59462ab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
- structurizr-import: Adds support for importing decisions managed by Log4brains.
- structurizr-import: Adds support for importing decisions in MADR format.
- structurizr-dsl: Adds `!decisions` as a synonym for `!adrs`.
- structurizr-dsl: Allows `!identifiers` to be used inside `model`.
- structurizr-inspection: Initial version.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ final class ModelDslContext extends GroupableDslContext {
@Override
protected String[] getPermittedTokens() {
return new String[] {
StructurizrDslTokens.IDENTIFIERS_TOKEN,
StructurizrDslTokens.GROUP_TOKEN,
StructurizrDslTokens.PERSON_TOKEN,
StructurizrDslTokens.SOFTWARE_SYSTEM_TOKEN,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -868,7 +868,7 @@ void parse(List<String> lines, File dslFile) throws StructurizrDslParserExceptio
Constant constant = new ConstantParser().parse(getContext(), tokens);
constants.put(constant.getName(), constant);

} else if (IDENTIFIERS_TOKEN.equalsIgnoreCase(firstToken) && inContext(WorkspaceDslContext.class)) {
} else if (IDENTIFIERS_TOKEN.equalsIgnoreCase(firstToken) && (inContext(WorkspaceDslContext.class) || inContext(ModelDslContext.class))) {
setIdentifierScope(new IdentifierScopeParser().parse(getContext(), tokens));

} else {
Expand Down

0 comments on commit 59462ab

Please sign in to comment.