go-tree-sitter
go-tree-sitter copied to clipboard
Update Kotlin grammar.
trafficstars
This is the result of running go run _automation/main.go update kotlin.
PTAL
Any updates here @smacker?
Update? Maybe we need to fork this repo to get timely updates in.
We've done that for now: https://github.com/aspect-forks/go-tree-sitter/
Sorry not sure why github is not showing CI status for this MR but the tests are failing:
=== RUN TestGrammar
binding_test.go:28:
Error Trace: binding_test.go:28
Error: Not equal:
expected: "(source_file (import_list (import_header (identifier (simple_identifier) (simple_identifier) (simple_identifier)))) (function_declaration name: (simple_identifier) parameters: (function_value_parameters (parameter (simple_identifier) (user_type (type_identifier) (type_arguments (type_projection (user_type (type_identifier))))))) body: (function_body (statements (property_declaration variable: (variable_declaration (simple_identifier)) expression: (call_expression (navigation_expression (simple_identifier) (navigation_suffix (simple_identifier))) (call_suffix (value_arguments)))) (call_expression (simple_identifier) (call_suffix (value_arguments (value_argument (string_literal (interpolated_identifier))))))))))"
actual : "(source_file (import_list (import_header (identifier (simple_identifier) (simple_identifier) (simple_identifier)))) (function_declaration (simple_identifier) (parameter (simple_identifier) (user_type (type_identifier) (type_arguments (type_projection (user_type (type_identifier)))))) (function_body (statements (property_declaration (variable_declaration (simple_identifier)) (call_expression (navigation_expression (simple_identifier) (navigation_suffix (simple_identifier))) (call_suffix (value_arguments)))) (call_expression (simple_identifier) (call_suffix (value_arguments (value_argument (line_string_literal (interpolated_identifier))))))))))"
Diff:
--- Expected
+++ Actual
@@ -1 +1 @@
-(source_file (import_list (import_header (identifier (simple_identifier) (simple_identifier) (simple_identifier)))) (function_declaration name: (simple_identifier) parameters: (function_value_parameters (parameter (simple_identifier) (user_type (type_identifier) (type_arguments (type_projection (user_type (type_identifier))))))) body: (function_body (statements (property_declaration variable: (variable_declaration (simple_identifier)) expression: (call_expression (navigation_expression (simple_identifier) (navigation_suffix (simple_identifier))) (call_suffix (value_arguments)))) (call_expression (simple_identifier) (call_suffix (value_arguments (value_argument (string_literal (interpolated_identifier))))))))))
+(source_file (import_list (import_header (identifier (simple_identifier) (simple_identifier) (simple_identifier)))) (function_declaration (simple_identifier) (parameter (simple_identifier) (user_type (type_identifier) (type_arguments (type_projection (user_type (type_identifier)))))) (function_body (statements (property_declaration (variable_declaration (simple_identifier)) (call_expression (navigation_expression (simple_identifier) (navigation_suffix (simple_identifier))) (call_suffix (value_arguments)))) (call_expression (simple_identifier) (call_suffix (value_arguments (value_argument (line_string_literal (interpolated_identifier))))))))))
Test: TestGrammar
--- FAIL: TestGrammar (0.00s)
FAIL
FAIL github.com/smacker/go-tree-sitter/kotlin 0.331s
Kotlin was upgraded to v0.3.5 in this PR. I think this PR can be closed: https://github.com/smacker/go-tree-sitter/pull/145