dp.SyntaxHighlighter 1.5.2 Tests and Samples

http://code.google.com/p/syntaxhighlighter/

Scala

Languages:

  1. C#
  2. CSS
  3. C++
  4. Delphi
  5. Java
  6. JavaScript
  7. PHP
  8. Python
  9. Ruby
  10. SQL
  11. Visual Basic
  12. XML / HTML
  13. Scala
  14. Groovy
  15. Bash

Features:

  1. Smart tabs
  2. First line
  3. Expand code
  4. Show columns
  5. Blogger integration
  6. No gutter
  7. No controls

Issues:

  1. #7, XSL transformation
  2. #15, Incorrect single quote
  3. #10, VB crash
  4. #19, No matches
Block before.
object Timer {
	def oncePerSecond(callback: () => unit) {
		while (true) { callback(); Thread sleep 1000 }
	}
	
	def timeFlies() {
		println("time flies like an arrow...")
	}
	
	def main(args: Array[String]) {
		val exp: Tree = Sum(Sum(Var("x"),Var("x")),Sum(Const(7),Var("y")))
		val env: Environment = { case "x" => 5 case "y" => 7 }
		println("Expression: " + exp)
		println("Evaluation with x=5, y=7: " + eval(exp, env))
		println("Derivative relative to x:\n " + derive(exp, "x"))
	}
}
Block after.