pointers
This commit is contained in:
@@ -8,6 +8,7 @@ pub enum AstType {
|
||||
FunctionDeceleration,
|
||||
VoidFunctionDeceleration,
|
||||
VariableDeceleration,
|
||||
PointerDeceleration,
|
||||
MutVariableDeceleration,
|
||||
Include,
|
||||
IncludeLocal,
|
||||
@@ -95,6 +96,10 @@ impl Parser {
|
||||
ast_res.tokens.push(self.tokens[index+2].clone());
|
||||
ast_res.ast_type = AstType::MutVariableDeceleration;
|
||||
self.index += 2;
|
||||
} else if self.tokens[index+1].value=="*" && self.tokens[index+2].token_type==TokenType::Identifier {
|
||||
ast_res.tokens.push(self.tokens[index+2].clone());
|
||||
ast_res.ast_type = AstType::PointerDeceleration;
|
||||
self.index += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user