diff --git a/.idea/shelf/Uncommitted_changes_before_Checkout_at_01_09_2024,_17_06_[Changes]/shelved.patch b/.idea/shelf/Uncommitted_changes_before_Checkout_at_01_09_2024,_17_06_[Changes]/shelved.patch new file mode 100644 index 0000000..0560e67 --- /dev/null +++ b/.idea/shelf/Uncommitted_changes_before_Checkout_at_01_09_2024,_17_06_[Changes]/shelved.patch @@ -0,0 +1,89 @@ +Index: docs/.obsidian/workspace.json +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP +<+>{\n \"main\": {\n \"id\": \"cbdd596d5581d0bd\",\n \"type\": \"split\",\n \"children\": [\n {\n \"id\": \"f0791e32414f4ade\",\n \"type\": \"tabs\",\n \"children\": [\n {\n \"id\": \"70c6b5acdbfe7d32\",\n \"type\": \"leaf\",\n \"state\": {\n \"type\": \"graph\",\n \"state\": {}\n }\n }\n ]\n }\n ],\n \"direction\": \"vertical\"\n },\n \"left\": {\n \"id\": \"c6861b5f407a9444\",\n \"type\": \"split\",\n \"children\": [\n {\n \"id\": \"3417f06632c9394b\",\n \"type\": \"tabs\",\n \"children\": [\n {\n \"id\": \"8f11521b105c67d1\",\n \"type\": \"leaf\",\n \"state\": {\n \"type\": \"file-explorer\",\n \"state\": {\n \"sortOrder\": \"alphabetical\"\n }\n }\n },\n {\n \"id\": \"ae384b30d1ad5488\",\n \"type\": \"leaf\",\n \"state\": {\n \"type\": \"search\",\n \"state\": {\n \"query\": \"\",\n \"matchingCase\": false,\n \"explainSearch\": false,\n \"collapseAll\": false,\n \"extraContext\": false,\n \"sortOrder\": \"alphabetical\"\n }\n }\n },\n {\n \"id\": \"e445c0086dede19a\",\n \"type\": \"leaf\",\n \"state\": {\n \"type\": \"bookmarks\",\n \"state\": {}\n }\n }\n ]\n }\n ],\n \"direction\": \"horizontal\",\n \"width\": 300\n },\n \"right\": {\n \"id\": \"aaeb3344a765fafa\",\n \"type\": \"split\",\n \"children\": [\n {\n \"id\": \"4a0d31d7857aa1e5\",\n \"type\": \"tabs\",\n \"children\": [\n {\n \"id\": \"2fbf8a3345cf3fa6\",\n \"type\": \"leaf\",\n \"state\": {\n \"type\": \"backlink\",\n \"state\": {\n \"collapseAll\": false,\n \"extraContext\": false,\n \"sortOrder\": \"alphabetical\",\n \"showSearch\": false,\n \"searchQuery\": \"\",\n \"backlinkCollapsed\": false,\n \"unlinkedCollapsed\": true\n }\n }\n },\n {\n \"id\": \"2cddc5799be96423\",\n \"type\": \"leaf\",\n \"state\": {\n \"type\": \"outgoing-link\",\n \"state\": {\n \"linksCollapsed\": false,\n \"unlinkedCollapsed\": true\n }\n }\n },\n {\n \"id\": \"f84d3fe5715e89f0\",\n \"type\": \"leaf\",\n \"state\": {\n \"type\": \"tag\",\n \"state\": {\n \"sortOrder\": \"frequency\",\n \"useHierarchy\": true\n }\n }\n },\n {\n \"id\": \"024a9de203b51cdd\",\n \"type\": \"leaf\",\n \"state\": {\n \"type\": \"outline\",\n \"state\": {}\n }\n }\n ]\n }\n ],\n \"direction\": \"horizontal\",\n \"width\": 300,\n \"collapsed\": true\n },\n \"left-ribbon\": {\n \"hiddenItems\": {\n \"switcher:Open quick switcher\": false,\n \"graph:Open graph view\": false,\n \"canvas:Create new canvas\": false,\n \"daily-notes:Open today's daily note\": false,\n \"templates:Insert template\": false,\n \"command-palette:Open command palette\": false,\n \"table-editor-obsidian:Advanced Tables Toolbar\": false,\n \"obsidian-kanban:Create new board\": false\n }\n },\n \"active\": \"70c6b5acdbfe7d32\",\n \"lastOpenFiles\": [\n \"2024-08-30.md\",\n \"Docs/Implementation/3. Compilation/Shared/Type ID.md\",\n \"Docs/Implementation/3. Compilation/Shared/Function ID.md\",\n \"Docs/Implementation/3. Compilation/Shared/Shared.md\",\n \"Docs/Implementation/3. Compilation/Function Compilation/Function Compilation.md\",\n \"Docs/Implementation/3. Compilation/Name Resolution/Name Resolution.md\",\n \"Docs/Implementation/3. Compilation/3. Compilation.md\",\n \"Docs/Implementation/2. Parsing/2. Parsing.md\",\n \"Planning/Detailed/Type Parameters and Arrays.md\",\n \"Planning/Detailed/By-Struct Name Resolution.md\",\n \"Planning/TODO.md\",\n \"Planning/Archive.md\",\n \"Planning/Planning.md\",\n \"Docs/Docs.md\",\n \"Docs/Usage/Usage.md\",\n \"Docs/Usage\",\n \"Docs/Implementation/Implementation.md\",\n \"Docs/Implementation/6. Execution.md\",\n \"Docs/Implementation/5. Linking.md\",\n \"Docs/Implementation/4. Assembling.md\",\n \"Docs/Implementation/1. Argument Parsing.md\",\n \"Docs/Implementation\",\n \"Docs/Implementation/3. Compilation/Shared\",\n \"Docs/Implementation/3. Compilation/Function Compilation\",\n \"Docs/Implementation/3. Compilation/Name Resolution\",\n \"Docs/Implementation/3. Compilation\",\n \"Docs/Implementation/2. Parsing\",\n \"Planning/Main.md\",\n \"Docs\",\n \"Planning/Detailed\",\n \"planning/TODO.md\",\n \"Planning\",\n \"Welcome.md\"\n ]\n} +=================================================================== +diff --git a/docs/.obsidian/workspace.json b/docs/.obsidian/workspace.json +--- a/docs/.obsidian/workspace.json ++++ b/docs/.obsidian/workspace.json +@@ -11,11 +11,28 @@ + "id": "70c6b5acdbfe7d32", + "type": "leaf", + "state": { +- "type": "graph", +- "state": {} ++ "type": "markdown", ++ "state": { ++ "file": "Planning/Detailed/By-Struct Name Resolution.md", ++ "mode": "source", ++ "source": false ++ } + } ++ }, ++ { ++ "id": "0450c8bc5ccf77a5", ++ "type": "leaf", ++ "state": { ++ "type": "markdown", ++ "state": { ++ "file": "Notes.md", ++ "mode": "source", ++ "source": false ++ } ++ } + } +- ] ++ ], ++ "currentTab": 1 + } + ], + "direction": "vertical" +@@ -81,6 +98,7 @@ + "state": { + "type": "backlink", + "state": { ++ "file": "Notes.md", + "collapseAll": false, + "extraContext": false, + "sortOrder": "alphabetical", +@@ -97,6 +115,7 @@ + "state": { + "type": "outgoing-link", + "state": { ++ "file": "Notes.md", + "linksCollapsed": false, + "unlinkedCollapsed": true + } +@@ -118,7 +137,9 @@ + "type": "leaf", + "state": { + "type": "outline", +- "state": {} ++ "state": { ++ "file": "Notes.md" ++ } + } + } + ] +@@ -140,8 +161,11 @@ + "obsidian-kanban:Create new board": false + } + }, +- "active": "70c6b5acdbfe7d32", ++ "active": "0450c8bc5ccf77a5", + "lastOpenFiles": [ ++ "Planning/Detailed/By-Struct Name Resolution.md", ++ "Notes.md", ++ "Planning/Detailed/Type Parameters and Arrays.md", + "2024-08-30.md", + "Docs/Implementation/3. Compilation/Shared/Type ID.md", + "Docs/Implementation/3. Compilation/Shared/Function ID.md", +@@ -150,8 +174,6 @@ + "Docs/Implementation/3. Compilation/Name Resolution/Name Resolution.md", + "Docs/Implementation/3. Compilation/3. Compilation.md", + "Docs/Implementation/2. Parsing/2. Parsing.md", +- "Planning/Detailed/Type Parameters and Arrays.md", +- "Planning/Detailed/By-Struct Name Resolution.md", + "Planning/TODO.md", + "Planning/Archive.md", + "Planning/Planning.md", diff --git a/.idea/shelf/Uncommitted_changes_before_Checkout_at_01_09_2024,_17_06_[Changes]1/shelved.patch b/.idea/shelf/Uncommitted_changes_before_Checkout_at_01_09_2024,_17_06_[Changes]1/shelved.patch new file mode 100644 index 0000000..264a26a --- /dev/null +++ b/.idea/shelf/Uncommitted_changes_before_Checkout_at_01_09_2024,_17_06_[Changes]1/shelved.patch @@ -0,0 +1,207 @@ +Index: src/root/shared/new_types.rs +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP +<+>UTF-8 +=================================================================== +diff --git a/src/root/shared/new_types.rs b/src/root/shared/new_types.rs +new file mode 100644 +--- /dev/null ++++ b/src/root/shared/new_types.rs +@@ -0,0 +1,46 @@ ++use std::collections::HashMap; ++use either::Either; ++use itertools::Itertools; ++use crate::root::parser::location::Location; ++ ++pub struct GlobalTable { ++ type_templates: HashMap, ++ cached_types: HashMap ++} ++ ++#[derive(Eq, PartialEq, Hash)] ++pub enum TypeID { ++ User { id: usize, parameters: Vec, array_count: usize }, ++ Builtin { id: usize } ++} ++ ++ ++#[derive(Eq, PartialEq)] ++pub struct TraitID(usize); ++ ++pub struct UserTypeTemplate { ++ location: Location, ++ parameters: Vec>, ++ attributes: Vec<(String, Either)> // (Name, Either) ++} ++ ++impl UserTypeTemplate { ++ pub fn fill<'a>(&'a self, parameters: &'a [TypeID]) -> UserType { ++ UserType { ++ location: &self.location, ++ size: 0, ++ attributes: self.attributes.iter().map(|(name, t)| { ++ match t { ++ Either::Left(t) => (0, name.as_str(), t), ++ Either::Right(i) => (0, name.as_str(), ¶meters[*i]) ++ } ++ }).collect_vec() ++ } ++ } ++} ++ ++pub struct UserType<'a> { ++ location: &'a Location, ++ size: usize, ++ attributes: Vec<(usize, &'a str, &'a TypeID)> ++} +\ No newline at end of file +Index: .idea/workspace.xml +IDEA additional info: +Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP +<+>\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n {\n "lastFilter": {\n "state": "OPEN",\n "assignee": "Robert-M-Lucas"\n }\n}\n \n \n \n {\n "selectedUrlAndAccountId": {\n "url": "https://github.com/Robert-M-Lucas/whython-8",\n "accountId": "5325d154-08ff-47af-a3ea-1a4a5e1c240e"\n }\n}\n \n \n \n \n {\n "customColor": "",\n "associatedIndex": 4\n}\n \n \n \n {\n "keyToString": {\n "Cargo.Build `Run whython-8`.executor": "Run",\n "Cargo.Run whython-8.executor": "Run",\n "Cargo.Test whython-8.executor": "Run",\n "RunOnceActivity.OpenProjectViewOnStart": "true",\n "RunOnceActivity.ShowReadmeOnStart": "true",\n "RunOnceActivity.rust.reset.selective.auto.import": "true",\n "Shell Script.Test Asm.executor": "Run",\n "git-widget-placeholder": "dev",\n "ignore.virus.scanning.warn.message": "true",\n "last_opened_file_path": "/home/robert/RustroverProjects/whython-8",\n "node.js.detected.package.eslint": "true",\n "node.js.detected.package.tslint": "true",\n "node.js.selected.package.eslint": "(autodetect)",\n "node.js.selected.package.tslint": "(autodetect)",\n "nodejs_package_manager_path": "npm",\n "org.rust.cargo.project.model.PROJECT_DISCOVERY": "true",\n "org.rust.cargo.project.model.impl.CargoExternalSystemProjectAware.subscribe.first.balloon": "",\n "org.rust.first.attach.projects": "true",\n "settings.editor.selected.configurable": "preferences.pluginManager",\n "vue.rearranger.settings.migration": "true"\n },\n "keyToStringList": {\n "com.intellij.ide.scratch.ScratchImplUtil$2/New Scratch File": [\n "Rust"\n ]\n }\n}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n 1714088144106\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n