From 4bb0b4505e2c3de44d83701e51b607ebffe97b8a Mon Sep 17 00:00:00 2001 From: Seemann Date: Tue, 21 Nov 2023 10:33:51 -0500 Subject: [PATCH] make ls aware of new include_once token --- src/language_service/scanner.rs | 2 +- src/utils/compiler_const.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/language_service/scanner.rs b/src/language_service/scanner.rs index e2dab7c..2973cb8 100644 --- a/src/language_service/scanner.rs +++ b/src/language_service/scanner.rs @@ -19,7 +19,7 @@ fn document_tree_walk<'a>( let first = words.next()?.to_ascii_lowercase(); if let Some(token) = reserved_words.map.get(&first) { - if token == &TOKEN_INCLUDE { + if token == &TOKEN_INCLUDE || token == &TOKEN_INCLUDE_ONCE { let mut include_path = words.collect::(); if include_path.ends_with('}') { diff --git a/src/utils/compiler_const.rs b/src/utils/compiler_const.rs index 01111ef..77b4505 100644 --- a/src/utils/compiler_const.rs +++ b/src/utils/compiler_const.rs @@ -1,5 +1,6 @@ // from compiler.ini pub const TOKEN_INCLUDE: i32 = 103; +pub const TOKEN_INCLUDE_ONCE: i32 = 109; pub const TOKEN_CONST: i32 = 65; pub const TOKEN_END: i32 = 255; pub const TOKEN_INT: i32 = 1;