conlang: Patterns...2!
- Deny arbitrary paths in patterns (only one non-keyword identifier allowed!) - Allow patterns in for-loop binders (literally useless atm, but it's a step toward making patterns the only way to bind names.) Next: Functions, Tuple Struct Patterns... And solving the stupid syntactic ambiguity of structors.
This commit is contained in:
		| @@ -428,7 +428,7 @@ pub mod yamlify { | ||||
|     impl Yamlify for Pattern { | ||||
|         fn yaml(&self, y: &mut Yamler) { | ||||
|             match self { | ||||
|                 Pattern::Path(path) => y.value(path), | ||||
|                 Pattern::Name(name) => y.value(name), | ||||
|                 Pattern::Literal(literal) => y.value(literal), | ||||
|                 Pattern::Ref(mutability, pattern) => { | ||||
|                     y.pair("mutability", mutability).pair("subpattern", pattern) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user