@Override
	protected void run() throws Exception {
		// The API is accessed using a callback, so instantiate the class to receive that callback.
		PcodeOpEntryVisitor visitor = new DumpPcodeOps();
		// Perform the iteration with the given callback visitor.
		int result = SleighLanguages.traverseAllPcodeOps(
			(SleighLanguage) currentProgram.getLanguage(), visitor);
		println("Result: " + result);
	}
This is a demonstration script to show how to query SLEIGH-based languages for various features.
It simply dumps a list of constructor line numbers and patterns for instructions that have a
RETURN PCode operation. If performed over every supported language and stored into a database,
this could be used to find all supported languages having a "ret" or similar instruction with a
given encoding.
Ghidra/Features/Base/ghidra_scripts/LanguagesAPIDemoScript.java