Skip to content

Commit

Permalink
Define SyntaxInformation for parameters.
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Piskunov committed Jul 11, 2021
1 parent 249a9fa commit 1e10610
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Kernel/A1$generatorSystem.m
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
$generatorPackageScopeSymbols[publicSymbol] = packageScopeSymbol;
$generatorParameters[publicSymbol] = parameterValues;
$generatorProperties[publicSymbol] = property;
SyntaxInformation[publicSymbol] = {"ArgumentsPattern" -> {system_, init_., parameters___}};
SetUsage @ Evaluate @ StringRiffle[
{ToString[publicSymbol] <> "[system$, init$, parameters$] " <> usage,
systemUsage,
Expand All @@ -122,6 +123,7 @@
declareSystemParameter[name_, defaultValue_, pattern_, usage_] := (
$parameterDefaults[name] = defaultValue;
$parameterPatterns[name] = pattern;
SyntaxInformation[name] = {"ArgumentsPattern" -> {}};
SetUsage @ Evaluate[ToString[name] <> " " <> usage];
);

Expand Down Expand Up @@ -159,7 +161,6 @@
SetReplace, Failure["unknownGeneratorParameters", <|"parameters" -> missingParameters, "generator" -> #|>]];
];
] & /@ $SetReplaceGenerators;
Scan[(SyntaxInformation[#] = {"ArgumentsPattern" -> {system_, init_., parameters___}}) &, $SetReplaceGenerators];
defineGeneratorImplementation /@ Keys @ $generatorParameters;
);

Expand Down

0 comments on commit 1e10610

Please sign in to comment.