Skip to content

Commit

Permalink
Ensures restricted mode setting is propagated to spawned parsers.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonbrowndotje committed Dec 5, 2024
1 parent b6fd8cd commit a734e98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

final class DslParserContext extends DslContext {

private boolean restricted;
private File file;
private final boolean restricted;
private final File file;

DslParserContext(File file, boolean restricted) {
this.file = file;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Workspace parse(DslParserContext context, Tokens tokens) {
} else {
String dsl = content.getContent();
StructurizrDslParser structurizrDslParser = new StructurizrDslParser();
structurizrDslParser.setRestricted(context.isRestricted());
structurizrDslParser.parse(context, dsl);
workspace = structurizrDslParser.getWorkspace();
}
Expand Down

0 comments on commit a734e98

Please sign in to comment.