same_syntax_context

func same_syntax_context(a: &SyntaxContext, b: &SyntaxContext) -> Bool

Returns whether both contexts contain the same scope identities.

Scope order is ignored; contexts behave as sets even though their compact representation preserves insertion order.

View Source
pub func same_syntax_context(a: &SyntaxContext, b: &SyntaxContext) -> Bool {
	if a.scopes.count != b.scopes.count { return false }
	for scope in a.scopes {
		if contains_scope(context: b, scope: scope) == false { return false }
	}
	true
}