-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] format tool: the index signatures in schema stmt are always formatted before attributes #789
Comments
cause: Since the AST is designed to not include the index signatures in the schema body, the order between the index signatures and attributes is not recorded. @Peefy Is this |
@amyXia1994 In a schema, the syntax of index signatures is not close to the syntax of schema attribute definitions, and the order is independent in the schema. We need to define index signatures in the specification as being written as early as possible because they represent the overall composition of schema attributes. |
Ok, got it, so the behavior of described in this issue is actually a feature of the code style spec. Let's add new rules to clarify this. |
tracked in kcl-lang/kcl-lang.io#183 |
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
kcl-fmt main.k
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your KCL components version? (Required)
The text was updated successfully, but these errors were encountered: