From 266f8784207fac8f5e59e087e708f9957b52c656 Mon Sep 17 00:00:00 2001 From: shruti2522 Date: Sat, 1 Jun 2024 05:29:43 +0530 Subject: [PATCH] add tests to sema_token Signed-off-by: shruti2522 --- kclvm/tools/src/LSP/src/semantic_token.rs | 3 +++ kclvm/tools/src/LSP/src/test_data/sema_token.k | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/kclvm/tools/src/LSP/src/semantic_token.rs b/kclvm/tools/src/LSP/src/semantic_token.rs index bb290e9a6..0c71fd09b 100644 --- a/kclvm/tools/src/LSP/src/semantic_token.rs +++ b/kclvm/tools/src/LSP/src/semantic_token.rs @@ -155,6 +155,9 @@ mod tests { (1, 4, 4, 2), // name (2, 0, 1, 0), // n (0, 3, 3, 4), // num + (1, 0, 4, 0), // func + (0, 14, 1, 0), // x + (1, 4, 1, 0), // x ]; let res = semantic_tokens_full(&file, &gs); if let Some(tokens) = res { diff --git a/kclvm/tools/src/LSP/src/test_data/sema_token.k b/kclvm/tools/src/LSP/src/test_data/sema_token.k index 74be332c8..8fdecd1d5 100644 --- a/kclvm/tools/src/LSP/src/test_data/sema_token.k +++ b/kclvm/tools/src/LSP/src/test_data/sema_token.k @@ -6,4 +6,7 @@ schema Persons: p5: Persons = Persons { name: "alice" } -n: num = 1 \ No newline at end of file +n: num = 1 +func = lambda x{ + x +} \ No newline at end of file