2
1
Fork 0

Compare commits

..

No commits in common. "d603e3de533c74248621943bc85034620f4ef8c7" and "3fc1aa19fd484f9137108982c440db34f42d439a" have entirely different histories.

3 changed files with 4 additions and 8 deletions

2
.gitignore vendored
View file

@ -5,7 +5,7 @@
# typegen # typegen
/typegen/target /typegen/target
/build /build
/content/docs/types/QuickShell* /content/docs/types/QuickShell
/data/modules /data/modules
# hugo # hugo

View file

@ -2,16 +2,12 @@ clean:
rm -rf build rm -rf build
rm -rf data/modules/QuickShell rm -rf data/modules/QuickShell
rm -rf content/docs/types/QuickShell rm -rf content/docs/types/QuickShell
rm -rf data/modules/QuickShell.Wayland
rm -rf content/docs/types/QuickShell.Wayland
typedocs: clean typedocs: clean
cd typegen && cargo build cd typegen && cargo build
mkdir -p build/types/types mkdir -p build/types/types
./typegen/target/debug/typegen gentypes ../src/core/module.md build/types/types/QuickShell.json ./typegen/target/debug/typegen gentypes ../src/cpp/module.md build/types/types/QuickShell.json
./typegen/target/debug/typegen gentypes ../src/wayland/module.md build/types/types/QuickShell.Wayland.json sh -c './typegen/target/debug/typegen gendocs ../src/cpp/module.md data/modules/QuickShell content/docs/types/QuickShell types/* build/types/types/*'
sh -c './typegen/target/debug/typegen gendocs ../src/core/module.md data/modules/QuickShell content/docs/types/QuickShell types/* build/types/types/*'
sh -c './typegen/target/debug/typegen gendocs ../src/wayland/module.md data/modules/QuickShell.Wayland content/docs/types/QuickShell.Wayland types/* build/types/types/*'
serve: typedocs serve: typedocs
hugo server --buildDrafts --disableFastRender hugo server --buildDrafts --disableFastRender

View file

@ -129,7 +129,7 @@ impl Default for ParseContext<'_> {
impl Parser { impl Parser {
pub fn new() -> Self { pub fn new() -> Self {
Self { Self {
class_regex: Regex::new(r#"(?<comment>(\s*\/\/\/.*\n)+)?\s*class\s+(?<name>\w+)(?:\s*:\s*public\s+(?<super>\w+)(\s*,(\s*\w+)*)*)?\s*\{(?<body>[\s\S]*?)};"#).unwrap(), class_regex: Regex::new(r#"(?<comment>(\s*\/\/\/.*\n)+)?\s*class\s+(?<name>\w+)(?:\s*:\s*public\s+(?<super>\w+))?.+?\{(?<body>[\s\S]*?)};"#).unwrap(),
macro_regex: Regex::new(r#"(?<comment>(\s*\/\/\/.*\n)+)?\s*(?<type>(Q|QML)_\w+)\s*(\(\s*(?<args>.*)\s*\))?;"#).unwrap(), macro_regex: Regex::new(r#"(?<comment>(\s*\/\/\/.*\n)+)?\s*(?<type>(Q|QML)_\w+)\s*(\(\s*(?<args>.*)\s*\))?;"#).unwrap(),
property_regex: Regex::new(r#"^\s*(?<type>(\w|::|<|>)+\*?)\s+(?<name>\w+)(\s+(MEMBER\s+(?<member>\w+)|READ\s+(?<read>\w+)|WRITE\s+(?<write>\w+)|NOTIFY\s+(?<notify>\w+)|(?<const>CONSTANT)))+\s*$"#).unwrap(), property_regex: Regex::new(r#"^\s*(?<type>(\w|::|<|>)+\*?)\s+(?<name>\w+)(\s+(MEMBER\s+(?<member>\w+)|READ\s+(?<read>\w+)|WRITE\s+(?<write>\w+)|NOTIFY\s+(?<notify>\w+)|(?<const>CONSTANT)))+\s*$"#).unwrap(),
fn_regex: Regex::new(r#"(?<comment>(\s*\/\/\/.*\n)+)?\s*(?<invokable>Q_INVOKABLE)?\s+(?<type>(\w|::|<|>)+\*?)\s+(?<name>\w+)\((?<params>[\s\S]*?)\);"#).unwrap(), fn_regex: Regex::new(r#"(?<comment>(\s*\/\/\/.*\n)+)?\s*(?<invokable>Q_INVOKABLE)?\s+(?<type>(\w|::|<|>)+\*?)\s+(?<name>\w+)\((?<params>[\s\S]*?)\);"#).unwrap(),