fn fullAssignDestructureComponents(tree: Ast, info: full.AssignDestructure.Components) full.AssignDestructure tree: Astinfo: full.AssignDestructure.Components2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019fn fullAssignDestructureComponents(tree: Ast, info: full.AssignDestructure.Components) full.AssignDestructure {
var result: full.AssignDestructure = .{
.comptime_token = null,
.ast = info,
};
const first_variable_token = tree.firstToken(info.variables[0]);
const maybe_comptime_token = switch (tree.nodeTag(info.variables[0])) {
.global_var_decl,
.local_var_decl,
.aligned_var_decl,
.simple_var_decl,
=> first_variable_token,
else => first_variable_token - 1,
};
if (tree.tokenTag(maybe_comptime_token) == .keyword_comptime) {
result.comptime_token = maybe_comptime_token;
}
return result;
}