Skip to content

Commit

Permalink
Planning
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-M-Lucas committed Aug 30, 2024
1 parent 24ce888 commit f452593
Show file tree
Hide file tree
Showing 25 changed files with 150 additions and 59 deletions.
32 changes: 14 additions & 18 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 13 additions & 5 deletions docs/.obsidian/graph.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
{
"collapse-filter": true,
"collapse-filter": false,
"search": "",
"showTags": false,
"showAttachments": false,
"hideUnresolved": false,
"showOrphans": true,
"collapse-color-groups": true,
"colorGroups": [],
"collapse-display": true,
"collapse-color-groups": false,
"colorGroups": [
{
"query": "tag:#Planning ",
"color": {
"a": 1,
"rgb": 14048348
}
}
],
"collapse-display": false,
"showArrow": false,
"textFadeMultiplier": 0,
"nodeSizeMultiplier": 1,
"lineSizeMultiplier": 1,
"collapse-forces": true,
"collapse-forces": false,
"centerStrength": 0.518713248970312,
"repelStrength": 10,
"linkStrength": 1,
Expand Down
9 changes: 9 additions & 0 deletions docs/.obsidian/types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"types": {
"aliases": "aliases",
"cssclasses": "multitext",
"tags": "tags",
"Created": "date",
"Updated": "date"
}
}
57 changes: 29 additions & 28 deletions docs/.obsidian/workspace.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,15 @@
"type": "split",
"children": [
{
"id": "670e03f8ef10ebeb",
"id": "f0791e32414f4ade",
"type": "tabs",
"children": [
{
"id": "d67ca8a7c35e58c6",
"id": "70c6b5acdbfe7d32",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "Planning/Detailed/Type Parameters and Arrays.md",
"mode": "source",
"source": false
}
"type": "graph",
"state": {}
}
}
]
Expand Down Expand Up @@ -85,7 +81,6 @@
"state": {
"type": "backlink",
"state": {
"file": "Planning/Detailed/Type Parameters and Arrays.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
Expand All @@ -102,7 +97,6 @@
"state": {
"type": "outgoing-link",
"state": {
"file": "Planning/Detailed/Type Parameters and Arrays.md",
"linksCollapsed": false,
"unlinkedCollapsed": true
}
Expand All @@ -124,9 +118,7 @@
"type": "leaf",
"state": {
"type": "outline",
"state": {
"file": "Planning/Detailed/Type Parameters and Arrays.md"
}
"state": {}
}
}
]
Expand All @@ -148,26 +140,35 @@
"obsidian-kanban:Create new board": false
}
},
"active": "d67ca8a7c35e58c6",
"active": "70c6b5acdbfe7d32",
"lastOpenFiles": [
"Planning/Detailed/By-Struct Name Resolution.md",
"2024-08-30.md",
"Docs/Implementation/3. Compilation/Shared/Type ID.md",
"Docs/Implementation/3. Compilation/Shared/Function ID.md",
"Docs/Implementation/3. Compilation/Shared/Shared.md",
"Docs/Implementation/3. Compilation/Function Compilation/Function Compilation.md",
"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",
"Docs/Compilation/Shared/Function ID.md",
"Docs/Compilation/Shared/Type ID.md",
"Planning/Detailed/By-Struct Name Resolution.md",
"Planning/TODO.md",
"Planning/Archive.md",
"Docs/Compilation/Shared/Shared.md",
"Planning/Planning.md",
"Docs/Parsing/Parsing.md",
"Docs/Docs.md",
"Docs/Compilation/Compilation.md",
"Planning/TODO.md",
"Docs/Compilation/Name Resolution/Name Resolution.md",
"Docs/Compilation/Function Compilation/Function Compilation.md",
"Docs/Compilation/Shared",
"Docs/Compilation/Function Compilation",
"Docs/Compilation/Name Resolution",
"Docs/Compilation",
"Docs/Parsing",
"Docs/Usage/Usage.md",
"Docs/Usage",
"Docs/Implementation/Implementation.md",
"Docs/Implementation/6. Execution.md",
"Docs/Implementation/5. Linking.md",
"Docs/Implementation/4. Assembling.md",
"Docs/Implementation/1. Argument Parsing.md",
"Docs/Implementation",
"Docs/Implementation/3. Compilation/Shared",
"Docs/Implementation/3. Compilation/Function Compilation",
"Docs/Implementation/3. Compilation/Name Resolution",
"Docs/Implementation/3. Compilation",
"Docs/Implementation/2. Parsing",
"Planning/Main.md",
"Docs",
"Planning/Detailed",
Expand Down
3 changes: 0 additions & 3 deletions docs/Docs/Compilation/Compilation.md

This file was deleted.

4 changes: 2 additions & 2 deletions docs/Docs/Docs.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[[Compilation]]
[[Parsing]]
[[Implementation]]
[[Usage]]
7 changes: 7 additions & 0 deletions docs/Docs/Implementation/3. Compilation/3. Compilation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[[Function Compilation]]
[[Name Resolution]]
[[Shared]]

## Phases
1. [[Name Resolution]]
2. [[Function Compilation]]
File renamed without changes.
Empty file.
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
Created: 2024-08-30
Updated: 2024-08-30
---
Unique `isize` representing a type. A negative number is a builtin type, positive is user-defined. Similar to [[Type ID]]

Looking to be changed in [[Type Parameters and Arrays]]
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
Created: 2024-08-30
Updated: 2024-08-30
---

Unique `isize` representing a type. A negative number is a builtin type, positive is user-defined. Similar to [[Function ID]]

Looking to be changed in [[Type Parameters and Arrays]]
Empty file.
Empty file.
Empty file.
6 changes: 6 additions & 0 deletions docs/Docs/Implementation/Implementation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[[1. Argument Parsing]]
[[2. Parsing]]
[[3. Compilation]]
[[4. Assembling]]
[[5. Linking]]
[[6. Execution]]
Empty file added docs/Docs/Usage/Usage.md
Empty file.
4 changes: 4 additions & 0 deletions docs/Planning/Archive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
tags:
- Planning
---
5 changes: 5 additions & 0 deletions docs/Planning/Detailed/By-Struct Name Resolution.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
tags:
- Planning
---

8 changes: 7 additions & 1 deletion docs/Planning/Detailed/Type Parameters and Arrays.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
tags:
- Planning
---

## Target
1. Type parameters
2. Arrays
Expand All @@ -10,5 +15,6 @@
- [[Function ID]]s to be changed to a composite of the new [[Type ID]]s and a type-unique UID, possibly a `usize`
- [[Name Resolution]] needs to be available at [[Function Compilation]] (as all types can no longer be preprocessed)
- Consider doing all name resolution on-demand instead of having an explicit step. This will solve [[By-Struct Name Resolution]]
- [[Parsing]] needs to support rust-like `<` and `>` syntax, as well as `[]` everywhere where types may be used
- Consider name-resolution creating 'templates' for creating types to make type creation at [[Function Compilation]] time easier
- [[2. Parsing]] needs to support rust-like `<` and `>` syntax, as well as `[]` everywhere where types may be used

4 changes: 4 additions & 0 deletions docs/Planning/Planning.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
tags:
- Planning
---
## [[TODO]]
## Next
- Improve type system - [[Type Parameters and Arrays]]
Expand Down
4 changes: 2 additions & 2 deletions docs/Planning/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
kanban-plugin: board

---

#Planning
## TODO


Expand All @@ -24,6 +24,6 @@ kanban-plugin: board

%% kanban:settings
```
{"kanban-plugin":"board","list-collapse":[false,false,false,false]}
{"kanban-plugin":"board","list-collapse":[false,false,false,false],"tag-sort":[]}
```
%%
39 changes: 39 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
use std::marker::PhantomData;
use crate::root::errors::WErr;

mod root;

fn main() {
root::main();
}


// trait ProcessInto<P, R> {
// fn process(self, requirements: R) -> Result<P, WErr>;
// }
//
// enum MaybeProcessed<U, P, R> where U: ProcessInto<P, R> {
// Unprocessed(U, PhantomData<R>),
// Processed(P)
// }
//
// impl<U, P, R> MaybeProcessed<U, P, R> where U: ProcessInto<P, R> {
// pub fn get_processed(self, requirements: R) -> Result<P, WErr> {
// match self {
// MaybeProcessed::Unprocessed(u, _) => {
// u.process(requirements)
// }
// MaybeProcessed::Processed(p) => p
// }
// }
//
// pub fn get_processed_inplace(&mut self, requirements: R) -> Result<&mut P, WErr> {
// match self {
// MaybeProcessed::Unprocessed(u, _) => {
// *self = MaybeProcessed::Processed(
// u.
// );
//
// ()
// }
// MaybeProcessed::Processed(_) => {
// ()
// }
// }
// }
// }

0 comments on commit f452593

Please sign in to comment.