feat: retain managed visual objects and dispatch native input through Endor
Verify Tessera GUI / verify (push) Successful in 9m28s
Verify Tessera GUI / verify (push) Successful in 9m28s
This commit is contained in:
+27
-1
@@ -103,6 +103,12 @@ fn shift_statement(statement: &mut Stmt, offset: usize) {
|
||||
shift_span(&mut assignment.name.span, offset);
|
||||
shift_expression(&mut assignment.value, offset);
|
||||
}
|
||||
StmtKind::MemberAssignment(assignment) => {
|
||||
shift_span(&mut assignment.span, offset);
|
||||
shift_span(&mut assignment.name.span, offset);
|
||||
shift_expression(&mut assignment.object, offset);
|
||||
shift_expression(&mut assignment.value, offset);
|
||||
}
|
||||
StmtKind::Return(returned) => {
|
||||
shift_span(&mut returned.span, offset);
|
||||
if let Some(expression) = &mut returned.value {
|
||||
@@ -116,7 +122,27 @@ fn shift_statement(statement: &mut Stmt, offset: usize) {
|
||||
|
||||
fn shift_declaration(declaration: &mut Decl, offset: usize) {
|
||||
shift_span(&mut declaration.span, offset);
|
||||
let DeclKind::Function(function) = &mut declaration.kind;
|
||||
match &mut declaration.kind {
|
||||
DeclKind::Function(function) => shift_function(function, offset),
|
||||
DeclKind::Class(class) => {
|
||||
shift_span(&mut class.span, offset);
|
||||
shift_span(&mut class.name.span, offset);
|
||||
if let Some(base) = &mut class.base {
|
||||
shift_span(&mut base.span, offset);
|
||||
}
|
||||
for field in &mut class.fields {
|
||||
shift_span(&mut field.span, offset);
|
||||
shift_span(&mut field.name.span, offset);
|
||||
shift_span(&mut field.type_name.span, offset);
|
||||
}
|
||||
for method in &mut class.methods {
|
||||
shift_function(method, offset);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn shift_function(function: &mut frontend::ast::Function, offset: usize) {
|
||||
shift_span(&mut function.span, offset);
|
||||
shift_span(&mut function.name.span, offset);
|
||||
shift_span(&mut function.return_type.span, offset);
|
||||
|
||||
Reference in New Issue
Block a user