Added rust imports with header

This commit is contained in:
2024-06-23 17:53:46 +02:00
parent 9a614ef367
commit 15e0ff362c
10 changed files with 306 additions and 64 deletions
+7
View File
@@ -25,6 +25,7 @@ pub enum AstType {
CodeBlock,
Json,
Impl,
StaticExecution,
Other,
}
@@ -345,6 +346,12 @@ impl Parser {
ast_res.tokens.push(token.clone());
}
}
TokenType::StaticExecution => {
if self.tokens[index + 1].token_type == TokenType::Square {
ast_res.tokens.push(self.tokens[index + 1].clone());
ast_res.ast_type = AstType::StaticExecution;
}
}
_ => {
ast_res.tokens.push(token.clone());
}