Skip to content

Commit

Permalink
make ls aware of new include_once token
Browse files Browse the repository at this point in the history
  • Loading branch information
x87 committed Nov 21, 2023
1 parent 1a52518 commit 4bb0b45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/language_service/scanner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<String>();

if include_path.ends_with('}') {
Expand Down
1 change: 1 addition & 0 deletions src/utils/compiler_const.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down

0 comments on commit 4bb0b45

Please sign in to comment.