From fde29538f5d5facbf8060b77d5bc4dbb31495a2e Mon Sep 17 00:00:00 2001 From: Danilo Guanabara Date: Tue, 17 Oct 2023 16:32:50 -0300 Subject: [PATCH] Changing symbols accessible Path --- ecosystem/python/parser/src/identifier.rs | 2 +- ecosystem/python/parser/src/symbols/interface.rs | 2 +- ecosystem/python/parser/src/symbols/module.rs | 4 ++-- ecosystem/python/parser/src/symbols/scope.rs | 4 ++-- .../python/parser/src/symbols/scope/scope_type.rs | 4 ++-- ligen/symbols/src/lib.rs | 10 +++++++--- .../src/gui/ui/layout/editor/symbols/interface.rs | 2 +- tools/editor/src/gui/ui/layout/editor/symbols/mod.rs | 4 ++-- .../editor/src/gui/ui/layout/editor/symbols/module.rs | 2 +- .../editor/src/gui/ui/layout/editor/symbols/project.rs | 2 +- 10 files changed, 20 insertions(+), 16 deletions(-) diff --git a/ecosystem/python/parser/src/identifier.rs b/ecosystem/python/parser/src/identifier.rs index 37f60230..0748365e 100644 --- a/ecosystem/python/parser/src/identifier.rs +++ b/ecosystem/python/parser/src/identifier.rs @@ -1,4 +1,4 @@ -use ligen::symbols::identifier::Identifier; +use ligen::symbols::Identifier; use ligen::parsing::parser::Parser; use ligen::parsing::parser::universal::identifier::IdentifierParser as InternalParser; use crate::prelude::*; diff --git a/ecosystem/python/parser/src/symbols/interface.rs b/ecosystem/python/parser/src/symbols/interface.rs index 1f3e48a4..eb9ddec9 100644 --- a/ecosystem/python/parser/src/symbols/interface.rs +++ b/ecosystem/python/parser/src/symbols/interface.rs @@ -1,6 +1,6 @@ use crate::prelude::*; use rustpython_parser::ast::StmtClassDef; -use ligen::symbols::interface::Interface; +use ligen::symbols::Interface; use crate::identifier::IdentifierParser; use crate::symbols::scope::ScopeParser; diff --git a/ecosystem/python/parser/src/symbols/module.rs b/ecosystem/python/parser/src/symbols/module.rs index f5f88811..c7e088f4 100644 --- a/ecosystem/python/parser/src/symbols/module.rs +++ b/ecosystem/python/parser/src/symbols/module.rs @@ -1,7 +1,7 @@ use rustpython_parser::ast::ModModule; use rustpython_parser::parse; -use ligen::symbols::identifier::Identifier; -use ligen::symbols::module::Module; +use ligen::symbols::Identifier; +use ligen::symbols::Module; use crate::identifier::IdentifierParser; use crate::prelude::*; use crate::symbols::scope::ScopeParser; diff --git a/ecosystem/python/parser/src/symbols/scope.rs b/ecosystem/python/parser/src/symbols/scope.rs index de49687a..a14d354b 100644 --- a/ecosystem/python/parser/src/symbols/scope.rs +++ b/ecosystem/python/parser/src/symbols/scope.rs @@ -1,6 +1,6 @@ use rustpython_parser::ast::{Arguments, Expr, Stmt}; -use ligen::symbols::identifier::Identifier; -use ligen::symbols::interface::Interface; +use ligen::symbols::Identifier; +use ligen::symbols::Interface; use crate::identifier::IdentifierParser; use crate::prelude::*; use crate::symbols::interface::InterfaceParser; diff --git a/ecosystem/python/parser/src/symbols/scope/scope_type.rs b/ecosystem/python/parser/src/symbols/scope/scope_type.rs index 1e96bd61..fbfe5c65 100644 --- a/ecosystem/python/parser/src/symbols/scope/scope_type.rs +++ b/ecosystem/python/parser/src/symbols/scope/scope_type.rs @@ -1,5 +1,5 @@ -use ligen::symbols::interface::Interface; -use ligen::symbols::identifier::Identifier; +use ligen::symbols::Interface; +use ligen::symbols::Identifier; pub struct Scope { pub constants: Vec, diff --git a/ligen/symbols/src/lib.rs b/ligen/symbols/src/lib.rs index 1162ac1d..51d04c75 100644 --- a/ligen/symbols/src/lib.rs +++ b/ligen/symbols/src/lib.rs @@ -1,3 +1,7 @@ -pub mod module; -pub mod identifier; -pub mod interface; +mod module; +mod identifier; +mod interface; + +pub use module::*; +pub use identifier::*; +pub use interface::*; \ No newline at end of file diff --git a/tools/editor/src/gui/ui/layout/editor/symbols/interface.rs b/tools/editor/src/gui/ui/layout/editor/symbols/interface.rs index bbf796d7..3b766d6a 100644 --- a/tools/editor/src/gui/ui/layout/editor/symbols/interface.rs +++ b/tools/editor/src/gui/ui/layout/editor/symbols/interface.rs @@ -9,7 +9,7 @@ impl Interface { Self } - pub fn show(&mut self, ui: &mut egui::Ui, interface: &mut ligen_symbols::interface::Interface) { + pub fn show(&mut self, ui: &mut egui::Ui, interface: &mut ligen_symbols::Interface) { ui.vertical(|ui| { Identifier::new().show(ui, &mut interface.identifier); EditableList::new("Constants", "Add constant").show(ui, &mut interface.constants, |ui, constant| { diff --git a/tools/editor/src/gui/ui/layout/editor/symbols/mod.rs b/tools/editor/src/gui/ui/layout/editor/symbols/mod.rs index e019dd4d..d3242748 100644 --- a/tools/editor/src/gui/ui/layout/editor/symbols/mod.rs +++ b/tools/editor/src/gui/ui/layout/editor/symbols/mod.rs @@ -11,11 +11,11 @@ use crate::gui::ui::panes::Pane; #[derive(Default)] pub struct Editor { - module: ligen_symbols::module::Module + module: ligen_symbols::Module } impl Editor { - pub fn new(module: ligen_symbols::module::Module) -> Self { + pub fn new(module: ligen_symbols::Module) -> Self { Self { module } } } diff --git a/tools/editor/src/gui/ui/layout/editor/symbols/module.rs b/tools/editor/src/gui/ui/layout/editor/symbols/module.rs index cbc5850a..3ff366a7 100644 --- a/tools/editor/src/gui/ui/layout/editor/symbols/module.rs +++ b/tools/editor/src/gui/ui/layout/editor/symbols/module.rs @@ -11,7 +11,7 @@ impl Module { Self } - pub fn show(&mut self, ui: &mut egui::Ui, module: &mut ligen_symbols::module::Module) { + pub fn show(&mut self, ui: &mut egui::Ui, module: &mut ligen_symbols::Module) { CollapsingHeader::new(format!("{} - Symbols: {}", module.identifier, module.count_symbols())) .id_source("module") .show(ui, |ui| { diff --git a/tools/editor/src/gui/ui/layout/editor/symbols/project.rs b/tools/editor/src/gui/ui/layout/editor/symbols/project.rs index 5a521ff8..700c79b0 100644 --- a/tools/editor/src/gui/ui/layout/editor/symbols/project.rs +++ b/tools/editor/src/gui/ui/layout/editor/symbols/project.rs @@ -9,7 +9,7 @@ impl Project { Self } - pub fn show(&mut self, ui: &mut egui::Ui, module: &mut ligen_symbols::module::Module) { + pub fn show(&mut self, ui: &mut egui::Ui, module: &mut ligen_symbols::Module) { egui::ScrollArea::both() .auto_shrink([false, true]) .show(ui, |ui| {