Skip to content

Commit

Permalink
LSP: Collect program type keyword (FuelLabs#3737)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaBatty authored Jan 10, 2023
1 parent e24eb0c commit 9eac174
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sway-lsp/src/traverse/lexed_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,13 @@ impl<'a> LexedTree<'a> {
}

pub fn parse(&self, lexed_program: &LexedProgram) {
insert_keyword(self.tokens, lexed_program.root.tree.kind.span());
for item in &lexed_program.root.tree.items {
item.value.parse(self.tokens);
}

for (.., dep) in &lexed_program.root.submodules {
insert_keyword(self.tokens, dep.module.tree.kind.span());
for item in &dep.module.tree.items {
item.value.parse(self.tokens);
}
Expand Down

0 comments on commit 9eac174

Please sign in to comment.