copy_syntax_context

func copy_syntax_context(context: &SyntaxContext) -> SyntaxContext

Copies the ordered scope set so it can cross an ownership boundary.

View Source
pub func copy_syntax_context(context: &SyntaxContext) -> SyntaxContext {
	let scopes: [SyntaxScope] = []
	for scope in context.scopes { scopes.push(scope) }
	SyntaxContext(scopes: scopes)
}