KCL: Support non-ASCII identifiers (#7525)

Both human and LLMs want to write KCL code in non-English languages. This is important and we should support it.

Note that errors are currently a bit broken with non-ASCII identifiers, see #4327
This commit is contained in:
Adam Chalmers
2025-06-19 09:10:21 -05:00
committed by GitHub
parent 9eaacc2a51
commit 9dd6e3e852
12 changed files with 655 additions and 11 deletions

View File

@ -3605,3 +3605,24 @@ mod user_reported_union_2_bug {
super::execute(TEST_NAME, false).await
}
}
mod non_english_identifiers {
const TEST_NAME: &str = "non_english_identifiers";
/// Test parsing KCL.
#[test]
fn parse() {
super::parse(TEST_NAME)
}
/// Test that parsing and unparsing KCL produces the original KCL input.
#[tokio::test(flavor = "multi_thread")]
async fn unparse() {
super::unparse(TEST_NAME).await
}
/// Test that KCL is executed correctly.
#[tokio::test(flavor = "multi_thread")]
async fn kcl_test_execute() {
super::execute(TEST_NAME, true).await
}
}