typegen: hyprland module + lockfile update
This commit is contained in:
		
							parent
							
								
									3e1b15d759
								
							
						
					
					
						commit
						57ba1768f8
					
				
					 4 changed files with 13 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -132,7 +132,7 @@ impl Parser {
 | 
			
		|||
		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(),
 | 
			
		||||
			macro_regex: Regex::new(r#"(?<comment>(\s*\/\/\/.*\n)+)?\s*(?<hide>QSDOC_HIDE\s)?(?<type>(Q|QML|QSDOC)_\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*Q_INVOKABLE\s+(\[\[.*\]\]\s+)?(?<type>(\w|::|<|>)+\*?)\s+(?<name>\w+)\((?<params>[\s\S]*?)\)(\s*const)?;"#).unwrap(),
 | 
			
		||||
			signal_regex: Regex::new(r#"(?<comment>(\s*\/\/\/.*\n)+)?\s*void\s+(?<name>\w+)\((?<params>[\s\S]*?)\);"#).unwrap(),
 | 
			
		||||
			fn_param_regex: Regex::new(r#"(const\s+)?(?<type>(\w|::|<|>)+\*?)&?\s+(?<name>\w+)(,|$)"#).unwrap(),
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -119,6 +119,10 @@ pub fn resolve_types(
 | 
			
		|||
						list = true;
 | 
			
		||||
					} else if ctype.starts_with("QList<") {
 | 
			
		||||
						ctype = &ctype[6..ctype.len() - 1];
 | 
			
		||||
						if ctype.ends_with('*') {
 | 
			
		||||
							ctype = &ctype[0..ctype.len() - 1];
 | 
			
		||||
						}
 | 
			
		||||
 | 
			
		||||
						list = true;
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue