You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Bracket Expression Parsers can return any ParsedExpression and the information about the bracket expression is lost during the parsing.
Therefore, when using the code-formatter, the Bracket Expressions are replaced by their Parsed-Expression equivalent, which is not optimal for formatting scripts.
Example:
println(<item:minecraft:bedrock>.commandString);
// becomes after a re-format
println(BracketHandlers.getItem("minecraft:bedrock").commandString);
Possible Fixes/Ideas:
Optionally attach a custom Tag to Parsed expressions which will be used in the code-formatter if present. return expression.hasTag(FormattingInfo.class) ? expression.getTag(FormattingInfo.class).format() : expression.accept(formatterVisitor);
The text was updated successfully, but these errors were encountered:
Currently, Bracket Expression Parsers can return any ParsedExpression and the information about the bracket expression is lost during the parsing.
Therefore, when using the code-formatter, the Bracket Expressions are replaced by their Parsed-Expression equivalent, which is not optimal for formatting scripts.
Example:
Possible Fixes/Ideas:
return expression.hasTag(FormattingInfo.class) ? expression.getTag(FormattingInfo.class).format() : expression.accept(formatterVisitor);
The text was updated successfully, but these errors were encountered: